Create a Minecraft Paper 1.21 plugin called "Troll Star" with the following detailed specifications and fixes: 1. Troll Star Item: - Usable only in Survival and Creative mode. - Identified using PersistentDataContainer to prevent duplication or renaming. - Global cooldown: 50 seconds. - Only players with OP or permission "trollstar.use" can use it. - Players should be able to add extra custom abilities via configuration. - The command `/trollstar give <player>` gives the Troll Star to a player, requires permission "trollstar.give", and checks inventory space. --- 2. Ability GUI: 💎 Diamond — Fake Coordinates Drop - Sends a chat message with random far-away coordinates. - The message should appear as if it comes from a normal item drop (not "Fake GPS"). - No player selection required. - Respects Troll Star cooldown and individual ability cooldowns. 🌋 Lava Water — Temporary Damage Water - When activated, all water blocks on the server are temporarily harmful, without actually turning into lava. - Players standing in these water blocks take 3 hearts (6 health points) of damage per second. - The effect lasts exactly 10 seconds from the moment the ability is used. - After 10 seconds, all water blocks revert automatically to normal safe water. - Must track only water blocks present at the time of activation, and do not change other blocks. - Should work globally across all loaded worlds. - Respects cooldowns and permissions. 🟨 Yellow Block — Teleport - Teleports the Troll Star user instantly to a selected player. - GUI must display all online players as heads. - Respects cooldowns and permissions. 🥾 Boots — No Fall Damage - Grants target player immunity to fall damage for 20 seconds. - Must prevent all types of fall damage during the effect. - Selectable via GUI with player heads. - Respects cooldowns and permissions. 🟫 Brown Block — Inventory Viewing/Stealing - Opens a live inventory GUI for a selected player for 10 seconds. - The user can view and remove items from the target during this time. - Must handle Survival and Creative mode correctly. - Respects cooldowns and permissions. --- 3. Cooldowns and Safety: - Each ability can have its own configurable cooldown. - Troll Star itself has a 50-second cooldown. - Only Survival and Creative players with proper permissions can use abilities. - Track cooldowns using UUIDs. - Ensure timed effects (damage water, no-fall-damage, inventory steal) are automatically reverted after their duration. --- 4. Custom Abilities: - Players can define extra abilities via config. - Each ability specifies icon, effect, duration, target type, and cooldown. - Custom abilities integrate automatically into the GUI. --- 5. Implementation Notes: - Use PersistentDataContainer for item and ability tagging. - Use BukkitRunnable for timed effects: - Damage water effect lasts 10 seconds, then reverts blocks to safe water. - No-fall-damage effect lasts 20 seconds. - Inventory-steal effect lasts 10 seconds. - For damage water effect: - Track all water blocks present at activation. - Every second, apply 3 hearts of damage to players standing in these blocks. - After 10 seconds, revert water to normal (safe) state. - For fake drop coordinates: - Generate random X/Y/Z within world boundaries. - Display message formatted like a normal in-game drop. - GUI should display top-row icons and online player heads correctly. - Event listeners (`InventoryClickEvent`, `PlayerInteractEvent`) must be properly registered. - All abilities must check player mode and permissions before activation. - Plugin must be fully compatible with Paper 1.21. --- Goal: - The Troll Star allows a player to control special trolling abilities safely. - The temporary water/lava damage effect should not replace water blocks, only make them harmful for 10 seconds from activation. - All effects (damage water, inventory steal, no-fall-damage) revert automatically after their duration. - Fake drop coordinates appear realistic and as if from normal item drops. - GUI, cooldowns, permissions, and custom abilities are fully integrated.