Commit Graph

8 Commits

Author SHA1 Message Date
Teriuihi 74cf3589c0 Refactor configuration handling and add world border support
Moved FLAG settings from Config to GameConfig for better modularity. Introduced world border configuration with types and sizes for different game phases. Updated related classes to utilize new configuration structure and added error handling to prevent runtime failures.
2025-02-08 23:00:04 +01:00
Teriuihi 33578027d3 Refactor game class handling and fix GUI inventory usage.
Simplified game class retrieval by removing redundant data structures and combining logic. Updated GUI inventory to ensure tasks are run on the main thread using Bukkit's scheduler. Improved code organization by centralizing class selection logic in `TeamPlayer`.
2025-02-08 21:56:05 +01:00
Teriuihi 72dc1af903 Add flag turn-in location to team functionality
Introduced a new `flagTurnInLocation` property to the `Team` class, used to determine where players return flags. Updated relevant logic in `Flag` and `CreateTeam` to utilize this new property, including reducing the required distance for flag turn-in.
2025-02-08 21:03:01 +01:00
Teriuihi be7b508667 Integrate WorldBorderAPI and enhance game phase functionality
Added WorldBorderAPI dependency to manage player boundaries dynamically during game phases. Updated game phases, respawn mechanics, and class selection to utilize the WorldBorderAPI. Reworked related components to improve boundary handling, ensuring consistent gameplay flow and preparation for future enhancements.
2025-02-08 20:45:06 +01:00
Teriuihi a4f96297c2 Improve CTF gameplay mechanics and particle effects
Updated class selection to restrict changes during non-selection phases and adjusted spawn radius. Added flag particle trails and square border effects, improving visual feedback. Enhanced flag handling, clearing trails when the carrier is lost or offline.
2025-02-08 00:39:05 +01:00
Teriuihi 6f77135426 Refactor snowball handling and improve player interactions
Renamed OnSnowballHit to SnowballEvent and expanded functionality to handle projectile launches. Added InventoryItemInteractionEvent to manage item pickup and drop behavior. Updated player join logic to clear inventory, assign players to teams, and teleport them appropriately based on game state.
2025-02-07 23:48:40 +01:00
Teriuihi 73c11ab1ca Add GUI framework for class selection in CTF
Introduced a GUI system to facilitate class selection in the CTF game. This includes an abstract GUIInventory, GUIListener for event handling, and a ClassSelectionGUI for selecting classes. Also, added the "selectclass" command and integrated the GUI with game mechanics for improved player interaction.
2025-02-07 23:22:50 +01:00
Teriuihi 6a9721d0e7 Implemented remaining phases and got the plugin to the minimum viable product
Introduced new flag-related mechanics and game phases including `CombatPhase`, `EndedPhase`, and relevant event handling for better gameplay management. Enhanced team and player functionalities while making incremental adjustments to improve overall code structure.
2025-02-07 22:25:19 +01:00