
MemoryGuard
Just a memoryguard. Protect your server.
MemoryGuard
Automatically warns players and safely shuts down your Minecraft server when memory runs low, helping reduce the risk of world-file corruption caused by crashes.
MemoryGuard regularly monitors JVM heap memory and available host or container memory. When either falls below the configured threshold, the plugin broadcasts a warning and starts a countdown before shutting down the server normally, giving world data a chance to be saved.
Features
- Monitors both JVM heap memory and available host/container memory.
- Configurable memory threshold, check interval, and shutdown countdown.
- English and Traditional Chinese messages; English is the default.
- Detects container memory limits on Linux where available.
- Includes an admin test command for checking the shutdown flow.
Commands
/memoryguard reload— Reloads the configuration./memoryguard test— Tests the announcement and countdown. The server will actually shut down when the countdown ends. Run this only when downtime is acceptable.
These commands are restricted to server operators by default.
Installation and Configuration
Place the plugin JAR in your server’s plugins folder and restart the server. On first startup, the configuration file is created at plugins/MemoryGuard/config.yml.
The default memory threshold is 1.5 GB, the check interval is 30 seconds, and the shutdown countdown is 10 seconds. Adjust these values in the configuration file. Set language to en or zh to choose the message language, then run /memoryguard reload to apply the changes.
MemoryGuard shuts the server down normally, but it cannot restart Minecraft by itself. To restart automatically, enable restart-after-stop in your server hosting panel or startup script.
Compatibility
Compiled against the Paper API and intended for Paper and Purpur 1.20–26.3. Other Bukkit/Paper-based server software may work, but has not been individually tested and is not guaranteed to be compatible.
Сервер для плагина MemoryGuard - как у профи
Плагин MemoryGuard создан для серверов: на своём сервере вы настраиваете его под себя и решаете, кому играть. Создать сервер с плагином MemoryGuard для друзей можно за пару минут - BungeeHost всё уже подготовил.
