Inactivity Scripts
Running a Minecraft server often means juggling repetitive tasks: backing up worlds, sending welcome messages, or cleaning up after the last player leaves. Inactivity Scripts is a lightweight Paper plugin that automates these moments by executing custom commands or scripts when specific server events occur. Whether you are managing a small community server or a large network, this tool helps you keep everything running smoothly without constant manual intervention.
What Is Inactivity Scripts?
Inactivity Scripts is a server-side add-on designed for Paper, the high-performance fork of Minecraft. It listens for four distinct events and fires off any command or script you define. The plugin was tested on Minecraft versions 1.21.9 and 1.21.11 under Windows, but it is built to work across all 1.21.x releases. If you run a Paper server on 1.21 or any of its subversions, you can rely on Inactivity Scripts to integrate seamlessly.
The core idea is simple: you write a list of commands for each trigger, and the plugin executes them in order. You can even set a breakpoint that pauses the server shutdown until your script finishes, preventing crashes when a critical task is interrupted. This makes Inactivity Scripts a must-have for server owners who value stability and hands-off management.
Key Features and Events
Inactivity Scripts revolves around four triggers, each corresponding to a natural moment in your server's lifecycle. You can configure any number of commands for each event, and the plugin will process them sequentially.
Server Start
When your server boots up, Inactivity Scripts can run initialization tasks. Send a broadcast to welcome players, load a custom resource pack, or start a timer for scheduled restarts. This event fires once the server is fully operational, so all plugins and worlds are ready.
Server Stop
The stop event is where the breakpoint feature shines. Normally, a server shutdown disables plugins abruptly, which can cut off a running script mid-execution. With Inactivity Scripts, you can set a breakpoint that forces the server to wait until your command finishes. Use this to perform a final world save, upload logs to an external service, or clean up temporary files safely.
Player Count Changes to 1
This trigger activates when the server goes from empty to having exactly one player online. It is perfect for sending a personalized greeting, starting a minigame countdown, or enabling a maintenance mode that was active while the server was idle. You can also use it to log the first daily login for activity tracking.
Player Count Changes to 0
When the last player disconnects, Inactivity Scripts can reset the world, disable expensive redstone clocks, or pause entity-heavy farms. This helps conserve server resources and prepares the environment for the next session. Combined with the start event, you create a full cycle of automated housekeeping.
How to Install Inactivity Scripts
Getting started with Inactivity Scripts is straightforward. First, ensure you are running a Paper server on Minecraft 1.21 or a compatible 1.21.x version. Download Inactivity Scripts from a trusted source like the official PaperMC forums or a reputable plugin repository. Place the .jar file into your server's plugins folder and restart the server. The plugin will generate a default configuration file where you can define your commands.
If you use the foxygame.net launcher, adding Inactivity Scripts becomes even simpler. The launcher's built-in add-on catalog lets you find and install the plugin with a single click, and it automatically checks for updates so you never miss a compatibility patch for newer Paper builds. This integration saves time and reduces the risk of manual installation errors.
Configuring Your Scripts
After installation, open the config.yml file inside the Inactivity Scripts folder. You will see four sections: onServerStart, onServerStop, onPlayerCount1, and onPlayerCount0. Under each, list the commands you want to run. For example:
- onServerStart: "say Welcome to the server!"
- onServerStop: "save-all"
- onPlayerCount1: "give @p diamond 1"
- onPlayerCount0: "weather clear"
For the stop event, you can add a breakpoint by setting breakpoint: true. This tells the server to wait for the command to complete before proceeding with the shutdown. Use this carefully with long-running scripts, as it will delay the stop process. After editing, save the file and reload the plugin with /plugman reload InactivityScripts or restart the server.
Why Use Inactivity Scripts on Your Paper Server?
Inactivity Scripts fills a gap that many server admins face: the need for event-driven automation without complex scripting frameworks. It is minimal, focused, and does not bloat your server with unnecessary features. Because it runs on Paper, you benefit from the performance optimizations of that platform while adding custom logic exactly where you need it.
The plugin is especially useful for survival servers that want to pause time when nobody is online, for network hubs that need to reset lobbies, or for any server that runs scheduled maintenance. The breakpoint on server stop is a standout feature that prevents data corruption, a common headache with other command-running plugins. And since Inactivity Scripts is version-agnostic within the 1.21 family, you can update your Paper server without worrying about plugin breakage.
Conclusion
Inactivity Scripts is a practical, no-fuss solution for automating your Minecraft server based on real-time events. With support for server start, stop, and player count thresholds, it covers all the critical moments where a well-timed command can make a difference. The breakpoint option adds a layer of safety that experienced admins will appreciate. Whether you download Inactivity Scripts manually or grab it through the foxygame.net launcher for instant setup, you are equipping your server with a reliable tool that keeps things running on autopilot. Give it a try on your Paper 1.21 server and watch your daily tasks handle themselves.