Fixed a NullPointerException that spammed the console whenever another plugin (e.g. ArmorStandEditor, VotingPlugin) opened a custom inventory GUI. The error occurred because GhostyProtect assumed that InventoryHolder.getInventory() always returns a valid object — which is not guaranteed for custom plugin inventories. The method now null-checks the result before accessing it, so the error will never appear again regardless of what other plugins are installed on the server.
New Features
- Added two inventory GUIs:
- /mycontainers (aliases: /myc, /gpmy) — players can view all their own protected containers in a paginated GUI. Clicking a container prints its location and trusted players to chat.
- /gpcontainers <player> (aliases: /gpc, /admincontainers) — admins can view all protected containers of any player. Clicking a container teleports the admin directly to it.
- Both GUIs support pagination and are fully customizable via the language files.
- Added MySQL support — you can now choose between YAML (default, no setup required) and MySQL as the storage backend. Configurable in config.yml under storage.type.
- Added per-world support via /gpworld (alias: /gpw):
- /gpworld list — shows the current mode and listed worlds
- /gpworld mode <blacklist|whitelist> — switch between blacklist (plugin active everywhere except listed worlds) and whitelist (plugin only active in listed worlds)
- /gpworld enable <world> — add a world to the list
- /gpworld disable <world> — remove a world from the list
- Changes are saved to config.yml and take effect immediately without a reload.
- Added LICENSE.txt directly inside the JAR — the license is now bundled with the plugin file itself.
- Added console message on startup: By using this plugin you agree to the GhostyPlugins License.
Changes
- config.yml now fully in English, including all comments.
- Added new permission ghostyprotect.admin — covers /gpcontainers and /gpworld. Defaults to OP.
- ContainerManager is now backed by a StorageBackend interface — makes future storage implementations (e.g. SQLite) easy to add.
- Plugin now shuts down the storage backend cleanly on disable (important for MySQL connection handling).
- All new GUI messages and world command messages are fully translatable via de.yml / en.yml.
Bug Fixes
- Removed several unused imports that caused compiler warnings.
