Players were able to remove decorative/placeholder items (e.g. glass panes) from the main bounty GUI, but those items are intended to be visual-only.
The GUI needs protection so interactions with the top inventory do not allow item extraction or moving placeholder items into player inventories.
Description
Add a new GuiProtectionListener that cancels InventoryClickEvent for clicks targeting the top inventory of the bounty GUI to block item extraction (src/main/java/com/tcoded/playerbountiesplus/listener/GuiProtectionListener.java).
Add drag protection by cancelling InventoryDragEvent when any dragged slot intersects the GUI top inventory (src/main/java/com/tcoded/playerbountiesplus/listener/GuiProtectionListener.java).
Scope protections to the bounty menu by matching the inventory title against the configured gui.main.title string from the language util.
Register the new listener during plugin startup so the protections are active (src/main/java/com/tcoded/playerbountiesplus/PlayerBountiesOG.java).
Testing
Ran ./gradlew compileJava in this environment, which failed before compilation due to a Gradle runtime error (What went wrong: 25.0.1).
### Motivation
- Players were able to remove decorative/placeholder items (e.g. glass panes) from the main bounty GUI, but those items are intended to be visual-only.
- The GUI needs protection so interactions with the top inventory do not allow item extraction or moving placeholder items into player inventories.
### Description
- Add a new `GuiProtectionListener` that cancels `InventoryClickEvent` for clicks targeting the top inventory of the bounty GUI to block item extraction (`src/main/java/com/tcoded/playerbountiesplus/listener/GuiProtectionListener.java`).
- Add drag protection by cancelling `InventoryDragEvent` when any dragged slot intersects the GUI top inventory (`src/main/java/com/tcoded/playerbountiesplus/listener/GuiProtectionListener.java`).
- Scope protections to the bounty menu by matching the inventory title against the configured `gui.main.title` string from the language util.
- Register the new listener during plugin startup so the protections are active (`src/main/java/com/tcoded/playerbountiesplus/PlayerBountiesOG.java`).
### Testing
- Ran `./gradlew compileJava` in this environment, which failed before compilation due to a Gradle runtime error (`What went wrong: 25.0.1`).
------
[Codex Task](https://chatgpt.com/codex/tasks/task_e_69ae89659e94832f87c80c3b4bb07ab4)
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Motivation
Description
GuiProtectionListenerthat cancelsInventoryClickEventfor clicks targeting the top inventory of the bounty GUI to block item extraction (src/main/java/com/tcoded/playerbountiesplus/listener/GuiProtectionListener.java).InventoryDragEventwhen any dragged slot intersects the GUI top inventory (src/main/java/com/tcoded/playerbountiesplus/listener/GuiProtectionListener.java).gui.main.titlestring from the language util.src/main/java/com/tcoded/playerbountiesplus/PlayerBountiesOG.java).Testing
./gradlew compileJavain this environment, which failed before compilation due to a Gradle runtime error (What went wrong: 25.0.1).Codex Task