Production-ready mitigation plugin that ensures zMenu GUI sessions are closed safely when the zMenu plugin reloads or shuts down. Built for Paper/Spigot 1.20.1+ with configuration-driven behaviour and structured XML logging.
- Gracefully detects zMenu enable/disable lifecycle without a hard dependency and now forces load order ahead of zMenu so the scheduler bridge survives zMenu shutdown.
- Closes lingering inventory views on zMenu disable to prevent
IllegalPluginAccessException. - Bridges the zMenu Folia scheduler to ZMenuFix so shutdown tasks can complete without
IllegalPluginAccessExceptionnoise. - Optional player notifications, debug instrumentation, and async guards for thread safety.
- Structured XML log stream written to
plugins/ZMenuFix/handled-errors.xmlwith optional stack traces.
Configuration is stored at plugins/ZMenuFix/config.yml:
enabled: true
# Enables verbose debug console + file output
debug: false
log:
enabled: true
file: handled-errors.xml
include_stacktraces: false
fix:
close_on_zmenu_disable: true
close_all_inventories: true
async_guard: true
rebind_folia_scheduler: true
notify_players: false
notify_message: "&eYour menu was closed due to zMenu restart."zMenuFix/– Maven module containing the plugin implementation.src/java– Java sources for the plugin.src/resources– bundled configuration defaults and metadata.
- Install Java 17 or newer.
- Run
mvn clean package. - Drop the generated
target/ZMenuFix.jarinto your server'splugins/folder.
Issues and pull requests are welcome.