Create a Minecraft plugin named BulletDeathSwap for version 1.0.0 Create a Minecraft plugin named BulletDeathSwap for version 1.21.11 using the Spigot/Paper API. The core concept of the plugin is to periodically swap the locations of players or teams, creating a survival challenge. The plugin must include commands such as /deathswap start to start the game (if more than two players are online and teams are not set, it should send a message asking players to set up teams first), /deathswap stop to stop the game, /deathswap reload to reload the plugin, /deathswap team add <player1> <player2> to create a team, /deathswap team remove <player> to remove a player from their team, and /deathswap team swapper <player> to assign the player in a team who will participate in swapping (swapper). When the game starts, a default timer of 10 minutes (configurable in config.yml) should begin, and after every interval, the selected players or teams will have their locations swapped. One minute before the swap, a message should be sent: “&6BulletDeathSwap &8| 1 Min Left For Swap”, and during the last 10 seconds, an action bar countdown from 10 to 1 should be displayed. When the swap happens, players should receive a message: “&6BulletDeathSwap &8| You Have Been Swapped To <player_name>”. All messages, including chat, action bar, and system messages, must use the prefix “&6BulletDeathSwap &8| ” and should be fully customizable in a separate language.yml file. The plugin must include many messages such as game start, stop, reload success, team created, team removed, invalid usage, no permission, player not found, not enough players, swap success, countdown alerts, and error messages.
The config.yml file should be detailed and customizable, including options like swap-time (default 600 seconds), warning-time (default 60 seconds), enable-warning (true/false), enable-actionbar-countdown (true/false), enable-sounds (true/false), enable-titles (true/false), minimum-players-required, debug-mode, and customizable formats for messages, sounds, and titles. It should also allow enabling random swaps, swapping entire teams or only swappers, and toggling whether offline players are skipped or cause the swap to cancel. The language.yml file should contain all plugin messages such as prefix, start-message, stop-message, reload-message, team-add-success, team-remove-success, no-permission, player-not-found, not-enough-players, setup-teams-warning, one-minute-warning, countdown-message, swap-success-message, swap-cancelled-message, error-message, and more, all with color code support.
Additionally, the plugin should include features like a proper permission system (e.g., deathswap.admin), full tab completion for commands, console support, safe handling of player disconnects, prevention of crashes or null errors, clean and optimized Java code using schedulers for timing tasks, and a well-structured system for managing teams (such as using HashMaps or custom classes). The plugin should be efficient, stable, and fully compatible with Minecraft 1.21.11, while also including extra polish features like sounds, titles, and optional debug logging for developers.
No files in this session