Перейти к содержимому
Mineforgian

AntiRedstoneLag

prevents lag machine in server

Загрузки
3K
Подписчики
6
Обновлён
11 апреля 2026 г.
Лицензия
MIT

Опубликован 8 июня 2025 г.

AntiRedstoneLag

Version Minecraft License Discord

The Ultimate High-Performance Redstone Lag Prevention for Modern Minecraft Servers

FeaturesPerformance SpecsInstallationCommandsDeveloper Builds


⚡ About AntiRedstoneLag

AntiRedstoneLag is a lightweight yet extremely powerful plugin designed to safeguard your server from redstone-based lag machines and accidental over-engineering. Unlike basic limiters, AntiRedstoneLag uses asynchronous logging and O(1) tracking structures to monitor redstone activity with zero impact on your server's tick rate.


✨ Features

  • 🚀 Asynchronous Foundation: Logging and timestamp generation are offloaded to background threads.
  • 🎯 O(1) Chunk Cleanup: Refactored tracking logic for instant cleanup during chunk unloading.
  • 🌈 Modern UI: Full migration to Adventure API and MiniMessage for beautiful, hex-color alerts.
  • 🛡️ Lag Guard 1.21: Specifically optimized for Paper 1.21+ physics and redstone handling.
  • ⚙️ Smart Actions: Choose between REMOVE (with physics notifications), DROP, or DISABLE.
  • 📊 Persistent Analytics: Statistics tracking that survives server restarts.
  • 🔄 Automated CI/CD: Development builds published automatically via GitHub Actions.

🚀 Performance Specs

Optimization Method Impact
Tracking Nested Concurrent Maps O(1) Chunk Cleanup
Messaging Adventure API Hex & Gradient Support
Logging Async Timestamping Zero Main-Thread Overhead
Memory Fastutil Collections Reduced Boxing/GC Pressure

📦 Installation

  1. Download the latest release from Modrinth or GitHub.
  2. Place the .jar in your server's plugins/ folder.
  3. Restart your server.
  4. Configure limits in plugins/AntiRedstoneLag/config.yml.

Requirements: Paper, Spigot, or Purpur 1.21.1+ and Java 21.


🛠️ Configuration

Modern power and simplicity. AntiRedstoneLag supports MiniMessage hex codes (<gold>, <#ffcc00>, etc.) in all messages.

View Optimized config.yml
# Thresholds
chunk-threshold: 500      # Max redstone updates per chunk per resetting interval
block-threshold: 15       # Max updates per individual block before action

# Reset interval in ticks (20 = 1 second)
reset-interval-ticks: 20

# Action when threshold exceeded: REMOVE, DISABLE, or DROP
# REMOVE: Clears block (Recommended)
# DISABLE: Cancels active signals
# DROP: Breaks block and drops items
removal-action: REMOVE

# Warning system
warning:
  enabled: true
  threshold-percent: 80   # Warn at 80% of threshold

# Alerts
alerts:
  enabled: true
  log-to-console: true

# Logging
logging:
  enabled: true
  performance-stats: true

💻 Commands & Permissions

Command Description Permission
/arl help View command help antiredstonelag.use
/arl reload Hot-reload config antiredstonelag.reload
/arl stats Real-time performance stats antiredstonelag.stats
/arl logs View removal history antiredstonelag.logs

🏗️ Automated Builds

We use GitHub Actions to ensure code quality and instant delivery. Every push to master triggers a development build.

Beta Testing: Want the latest fixes before a stable release? Download the latest Development Pre-release from the Repository Actions or the Releases tab (labeled with dev-bX).


❓ Support

Discord GitHub Issues

Ченджлог

2.0.1Релиз1.21.9, 1.21.10, 1.21.11 · 11 апреля 2026 г.

Bug Fixes Implemented:

Resolved Redstone Duplication: Added a "state check" to the removal logic. The plugin now verifies if a block is already AIR before attempting to drop it again, which prevents fast redstone clocks from spawning multiple items in a single tick. Fixed Ineffective Actions (REMOVE/DISABLE): Previously, the plugin was removing blocks without physics updates, which created "ghost blocks" and didn't stop neighboring redstone components. Now updated the logic to use applyPhysics = true. This ensures the Paper/Spigot physics engine is properly notified, immediately breaking the redstone chain and ensuring the client-side view stays in sync.

2.0.0Релиз1.21.9, 1.21.10, 1.21.11 · 12 декабря 2025 г.

Version 2.0.0

Bug Fixes

  • Fixed version mismatch - Synchronized pom.xml version with plugin.yml (both now 2.0.0)
  • Fixed unused variable - Removed unused materialName variable in RedstoneListener
  • Fixed stats command - /arl stats now shows real statistics from CounterManager instead of hardcoded zeros
  • Fixed unused imports - Removed unused imports from CommandHandler and RedstoneListener
  • Fixed potential NPE - Added null check for location.getWorld() in CounterManager.sendAlert() to prevent crashes with unloaded chunks
  • Fixed event priority - Changed from MONITOR to LOW priority since we modify block state
  • Fixed log download - /arl logs download now shows log file info (name, size, path, modified date)

Optimizations

  • Thread-safe counters - Replaced HashMap with ConcurrentHashMap and AtomicInteger for thread safety
  • Memory-efficient keys - Using String keys instead of Chunk/Location objects 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 - RedstoneListener now 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 Location objects 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> with Object2IntOpenHashMap to eliminate boxing overhead and reduce memory allocations

New Features

  • Bypass permission - Players with antiredstonelag.bypass permission can place redstone without limits
  • Block owner tracking - Tracks who placed redstone blocks for bypass permission checks
  • Configurable reset interval - New reset-interval-ticks config option (default: 20 ticks = 1 second)
  • Debug mode - New debug config 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 to stats.yml and survive server restarts
  • Configurable removal action - New removal-action config option with three modes:
    • REMOVE - Set block to air (default)
    • DISABLE - Cancel redstone signal without removing block
    • DROP - 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.admin permission on join
    • Non-blocking async check on startup
  • Whitelist mode - Only monitor specific chunks instead of all chunks
    • Configure chunks as world:chunkX:chunkZ format
    • Useful for monitoring only known problem areas

Improvements

  • Real-time statistics - Stats command now displays actual monitored chunks, blocks, total removals, and daily removals
  • Better code structure - CommandHandler now receives CounterManager via 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 CounterManager methods to prevent potential NPEs
  • JavaDoc comments - Added documentation to key methods

New Permissions

  • antiredstonelag.bypass - Bypass redstone limits (default: false)
1.2Релиз1.21.8, 1.21.9, 1.21.10 · 4 ноября 2025 г.

New and Improved Features

Read the description

1.1Релиз1.21.6, 1.21.7, 1.21.8 · 7 сентября 2025 г.

Added Support for 1.21.8

1.0Релиз1.21.4, 1.21.5, 1.21.6 · 8 июня 2025 г.

First Release

Комментарии

Загружаем…