Item Log System (New Feature)
Every item removed from a player's inventory is now recorded persistently in the database (aa_item_logs table). The log captures three action types:
Action
Trigger
DELETED Admin right-clicks a slot to destroy the item
STOLEN Admin left-clicks a slot to take the item for themselves
CLEARED Admin hits
Clear Inventory; every item is logged with a shared
batch ID
- Armor slots and the offhand slot are now included in the logging system.
New GUI — Item Logs panel (gui/ItemLogGui.java)
- Accessibility:
- Player Action screen → slot 40 (Knowledge Book icon, row 4)
- Player Inventory view → slot 8 (top-right corner, always visible)
- Features:
- Paginated list: 36 entries per page, newest first.
- Entry details: Item icon, exact amount, action type (colour-coded), staff name, date, and restore status.
- Left-click: Restore directly to the player (drops at their feet if inventory is full).
- Right-click: Restore to the admin's own inventory.
- Restore Last Clear (Slot 47): Restores all items from the most recent unrestored inventory wipe in one click.
- Restore All (Slot 51): Restores every single unrestored item across all actions at once.
- Visual cues: Restored entries display a visual glow to distinguish them clearly.
Technical Additions
- New DB method: markAllItemLogsRestored(UUID playerUuid)
- New permission: authorityadmin.itemlogs (default: op)
Changed
- PlayerInventoryGui: Every item-removal action now triggers DatabaseManager.logItemTake(...) before modifying the inventory.
- GUI Updates:
- Added Item Logs shortcut (slot 8) to PlayerInventoryGui (accessible online/offline).
- Added Item Logs shortcut (slot 40) to PlayerActionGui.
- Configuration: Added all missing keys to messages.yml.
- Permissions: Added authorityadmin.itemlogs under the authorityadmin.* wildcard.
️ Fixed
- messages.yml: Resolved missing keys that caused silent/empty messages for:
- Actions: healed, teleported-to, teleported-here, fly-enabled, fly-disabled.
- Inventory: item-deleted, item-stolen, admin-full, cleared.
- Logs: log-restored, log-restored-admin, log-batch-restored, log-no-batch, log-already-restored, log-restore-failed, log-no-pending.