!API !Java
H-RAMWatch is a lightweight but powerful server management plugin for PaperMC, specifically designed to protect server performance on resource-constrained hardware. Its core function is to act as a "smart resource limiter" that identifies and gently removes players who are both idle (AFK) and located in an area that consumes excessive server resources.
The plugin's core philosophy is to only target players who are both idle (AFK) and in a resource-intensive area. Active players will never be affected.
/hrw dashboard) that displays live performance metrics for the server, worlds, and players./hrw toggle./hrw reload.config.yml file.The plugin's logic cycle is a multi-stage process designed for safety and efficiency. This ensures that the plugin itself does not contribute to server lag.
Asynchronous AFK Detection: The plugin runs a low-impact, asynchronous task to monitor player activity (movement, chat, etc.). If a player's inactivity exceeds the configured time, they are flagged as AFK. This check happens off the main server thread.
Synchronous Resource Scan: Once a player is flagged as AFK, a new task is scheduled on the main server thread to safely query the game world. It measures two key proxies for server load:
Decision and Action: The results of the scan are compared against the configured thresholds. If a player exceeds either limit, the plugin initiates the warning or kick process as defined in the configuration. All subsequent actions, like sending messages or kicking the player, are also handled safely on the main thread.
H-RAMWatch-X.X.X.jar file into your server's /plugins directory.plugins/H-RAMWatch/config.yml file.config.yml to your liking, and start it again.| Command | Permission | Default | Description |
|---|---|---|---|
/hrw dashboard [server|worlds|players] | hramwatch.dashboard | true | Displays the resource usage dashboard. |
/hrw toggle | hramwatch.toggle | op | Toggles the AFK kicker on or off live. |
/hrw reload | hramwatch.reload | op | Reloads the plugin's configuration file. |
| (No command) | hramwatch.bypass | op | Grants immunity from being kicked by the AFK limiter. |
config.yml)The default configuration is well-balanced, but you can customize it to fit your server.
# --- H-RAMWatch Configuration ---
# How often (in seconds) the plugin should check players for high resource usage.
check-interval-seconds: 30
afk-kick:
# Should the AFK kicker be enabled when the server starts?
enabled-by-default: true
# Time in minutes a player must be inactive to be considered AFK.
afk-time-minutes: 10
# If an AFK player has more than this many chunks loaded in their view, they are a candidate for kicking.
chunk-threshold: 500
# If an AFK player has more than this many entities within the check-radius, they are a candidate for kicking.
entity-threshold: 250
# The radius (in blocks) around the player to check for entities.
entity-check-radius: 64
# Set to true to send a warning message before kicking the player.
warning-enabled: true
# Message sent to the player if they are over the limits and warning-enabled is true.
warning-message: "&c[Warning] You are AFK in a resource-intensive area and may be kicked soon."
# The message shown to the player when they are kicked.
kick-message: "&cYou were kicked for being AFK in a resource-intensive area.\n&eThis is done to keep the server running smoothly for everyone!"
To build the plugin yourself, you'll need:
Clone the repository and run the following command from the project's root directory:
mvn clean package
The compiled JAR file will be located in the target/ directory.

H-RAMWatch is a lightweight PaperMC plugin that protects server performance by kicking AFK players causing high resource usage, featuring live dashboards and easy admin controls.