Tags
Creators
Details
Licensed MIT
Published last year
Updated last month
All versions
2.0.0
Release
AntiRedstoneLag 2.0.010 months ago 915
Compatibility
Minecraft: Java Edition
1.21.x
Platforms
Paper
Purpur
Spigot
Changes
Version 2.0.0
Bug Fixes
- Fixed version mismatch - Synchronized
pom.xmlversion withplugin.yml(both now 2.0.0) - Fixed unused variable - Removed unused
materialNamevariable inRedstoneListener - Fixed stats command -
/arl statsnow shows real statistics fromCounterManagerinstead of hardcoded zeros - Fixed unused imports - Removed unused imports from
CommandHandlerandRedstoneListener - Fixed potential NPE - Added null check for
location.getWorld()inCounterManager.sendAlert()to prevent crashes with unloaded chunks - Fixed event priority - Changed from
MONITORtoLOWpriority since we modify block state - Fixed log download -
/arl logs downloadnow shows log file info (name, size, path, modified date)
Optimizations
- Thread-safe counters - Replaced
HashMapwithConcurrentHashMapandAtomicIntegerfor thread safety - Memory-efficient keys - Using String keys instead of
Chunk/Locationobjects to prevent memory leaks - Extracted time constants - Magic numbers replaced with named constants (
TICKS_PER_HOUR,TICKS_PER_DAY,DAY_MS,ALERT_COOLDOWN_MS,BATCH_SIZE,FLUSH_INTERVAL_MS) - Cached config values -
RedstoneListenernow caches redstone materials, enabled worlds, and removal action for better performance - Refresh cache on reload - Cached values are automatically refreshed when config is reloaded
- Reduced object allocation - Avoid creating
Locationobjects in hot path; only create when actually needed for logging - Batched log writes - Log entries are buffered and flushed every 50 entries or 500ms instead of on every write
- Improved log rotation - Log file size is now checked on every flush, not just during cleanup task
- Primitive collections (fastutil) - Replaced
ConcurrentHashMap<String, AtomicInteger>withObject2IntOpenHashMapto eliminate boxing overhead and reduce memory allocations
New Features
- Bypass permission - Players with
antiredstonelag.bypasspermission can place redstone without limits - Block owner tracking - Tracks who placed redstone blocks for bypass permission checks
- Configurable reset interval - New
reset-interval-ticksconfig option (default: 20 ticks = 1 second) - Debug mode - New
debugconfig option for verbose logging during troubleshooting - Config validation - Threshold values are now validated (must be positive)
- Alert cooldown - 1 second cooldown between alerts to prevent spam when multiple blocks are removed
- Persistent statistics - Statistics (
totalRemovals,removalsToday) are saved tostats.ymland survive server restarts - Configurable removal action - New
removal-actionconfig option with three modes:REMOVE- Set block to air (default)DISABLE- Cancel redstone signal without removing blockDROP- Break block and drop item
- Warning system - Warns players when their redstone activity approaches the threshold
- Configurable warning threshold (default: 80% of limit)
- Per-player cooldown to prevent spam
- Only warns block owners who are online
- Update checker - Automatically checks for new versions on SpigotMC
- Notifies admins with
antiredstonelag.adminpermission on join - Non-blocking async check on startup
- Notifies admins with
- Whitelist mode - Only monitor specific chunks instead of all chunks
- Configure chunks as
world:chunkX:chunkZformat - Useful for monitoring only known problem areas
- Configure chunks as
Improvements
- Real-time statistics - Stats command now displays actual monitored chunks, blocks, total removals, and daily removals
- Better code structure -
CommandHandlernow receivesCounterManagervia dependency injection - Improved config comments - Better documentation in
config.yml - Stats saved on shutdown - Statistics are automatically saved when the plugin is disabled
- Null safety - Added null checks to
CounterManagermethods to prevent potential NPEs - JavaDoc comments - Added documentation to key methods
New Permissions
antiredstonelag.bypass- Bypass redstone limits (default: false)
Projects on Modrinth are automatically available through a Maven repository for use with JVM build tools such as Gradle. To learn more about the Modrinth Maven API, click here.
Note: When available, you should use the creator's maven repo instead as it will have transitive dependency information that the Modrinth Maven API does not. You may also end up with duplicate dependencies if you use a mix of Modrinth and non-Modrinth Maven repositories for your dependencies, because the group identifier will be different when served through the Modrinth Maven API.
Maven coordinates:
Version ID:
build.gradle:
repositories {
exclusiveContent {
forRepository {
maven {
name = "Modrinth"
url = "https://api.modrinth.com/maven"
}
}
// forRepositories(fg.repository) // Uncomment when using ForgeGradle
filter {
includeGroup "maven.modrinth"
}
}
}
// Standard Gradle dependency
dependencies {
implementation "maven.modrinth:5UOt11Yc:EfdPa6Hz"
}
// Legacy Loom dependency
dependencies {
modImplementation "maven.modrinth:5UOt11Yc:EfdPa6Hz"
}

