Commit Graph

27 Commits

Author SHA1 Message Date
Teriuihi 4953cec215 Make game logic adjustments and improve async command handling
Added permission checks for players bypassing game actions and refined block event handling based on game phase. Introduced asynchronous handling for permission commands to improve server performance. Updated constructors and dependencies to streamline game phase management.
2025-03-06 19:47:28 +01:00
Teriuihi 92f9e732a1 Remove redundant code and add victory reward commands
Removed unused methods and logging, such as `kickFromVoiceIfNeeded` and unnecessary permission checks. Added a feature to grant temporary permissions to winning players using LuckPerms. Updated the build number to reflect the changes.
2025-03-01 22:40:37 +01:00
Teriuihi 95b54d1a03 Prevent same-team players from being knocked back by flags.
Added a check to ensure players on the same team as the flag carrier are not affected by knockback when near the flag. Updated the build number to reflect the new changes.
2025-03-01 20:17:41 +01:00
Teriuihi 3c5842a92c Implement shield mechanics and enhance game end reset logic
Added shield blocking, cooldown, and breaking mechanics with sound and particle effects. Improved game reset functionality to properly remove players from teams at the end. Updated capture material and refactored imports for cleaner structure.
2025-03-01 19:29:46 +01:00
Teriuihi ce7297afb8 Refactor flag point update logic for winning team.
Fixed the logic for updating flag point. Ensures correct handling of winning and losing teams by directly iterating through entries. This way points are reduced if a team is no longer "winning".
2025-03-01 01:15:48 +01:00
Teriuihi 6008378258 Fix mage class damage and improve mage snowball throw logic
Updated Mage health regeneration from 3 to 1 and adjusted snowball velocity randomness for better gameplay balance. Fixed comparison in SnowballEvent to use `equals` and corrected parameter assignment in `consumer.apply`. Incremented build number to reflect the changes.
2025-03-01 00:45:07 +01:00
Teriuihi b5c59cf173 Implement knockback effect for players near captured flag
Added a feature to knock back nearby players when a flag is captured, creating space for the flag bearer.
2025-03-01 00:25:52 +01:00
Teriuihi d11cf25fc8 Add Mage character class with snowball duplication ability
Introduced the Mage class as a playable character along with its creation logic, tools, and armor setup. Mages can duplicate snowballs upon throwing, creating multiple projectiles with varying directions and velocities to enhance gameplay dynamics. Updated relevant systems to accommodate this new class.
2025-03-01 00:05:57 +01:00
Teriuihi 3550d75634 Introduce TeamScoreboard and highest stat tracking functionality.
This commit refactors scoreboard management into a dedicated TeamScoreboard class, improving modularity and readability. It also adds a new command to track and display the highest player stats across all game metrics, enhancing gameplay insights.
2025-02-28 22:21:23 +01:00
Teriuihi eeed5b4c54 Add player statistics tracking and integration.
Introduced a comprehensive system for tracking player stats, including kills, flags captured, damage dealt, and more. Integrated stat recording into related game events and ensured proper handling for both individual and team actions. This enhances gameplay analysis and future feature potential.
2025-02-23 01:14:27 +01:00
Teriuihi c09c55ed7a Add Discord integration for teams and user linking
Introduced database connectivity and Discord role management via MyBatis and JDA. Enhanced `Team` functionality to support Discord roles and integrated player-Discord linking during server join. Updated Gradle build to include required dependencies.
2025-02-15 22:31:35 +01:00
Teriuihi 4f0a4eff6f Update flag capture flow to notify players visually
Added a title notification for players when a team can capture the flag, improving communication during gameplay.
2025-02-15 04:10:52 +01:00
Teriuihi c02bda6ea7 Add slowness effect to flag carriers and clear it on reset
Flag carriers now receive a slowness effect to hinder movement while holding the flag. The effect is cleared when the flag carrier is reset to ensure consistent gameplay behavior. Updated build number to reflect these changes.
2025-02-15 04:07:07 +01:00
Teriuihi 400032a94c Switch from UUID to Player & add scoreboard for teams
Replaced UUID-based logic with Player objects across all game systems. Added team scorebaord sfor colors in tab and clarity for players as to who is in the laed
2025-02-15 03:53:35 +01:00
Teriuihi 8b09e54106 Fix flag capture and game phase timing bugs
Adjusted the flag capture sequence to ensure proper update of the carrier before notifying about the capture. Fixed the phaseStartTime initialization to correctly track phase transitions. Updated the build number for the new changes.
2025-02-11 23:02:38 +01:00
Teriuihi a3c22cf074 Refactor flag reset logic for clarity and reuse.
Consolidated flag reset responsibilities into `resetFlagCarrier` and `resetAll` methods to improve code readability and maintainability. Replaced redundant flag reset operations with the new methods across the codebase. Updated `EndedPhase` to use `resetAll` for consistent behavior.
2025-02-11 22:08:58 +01:00
Teriuihi 4cfc8f1572 Fix flag particle spawn location during turn-in
Updated the particle spawning method to use the flag's turn-in location instead of the world border center. This ensures particles are correctly displayed at the intended location, aligning with gameplay expectations.
2025-02-11 21:46:44 +01:00
Teriuihi 9563e9641f Add skip phase command to bypass game phases
Introduced a new `/ctf skipphase` command allowing admins to skip the current game phase. Updated relevant classes to handle phase-skipping logic and ensure proper game state transitions. Added corresponding message configuration and subcommand registration.
2025-02-11 21:45:14 +01:00
Teriuihi 4af509eb5f Fix world border config loading and phase transition logic
Made DEFAULT_SIZE in GameConfig mutable and ensured it updates dynamically from the configuration. Corrected phase transition logic in RunningGame to prevent potential out-of-bounds errors. Updated capture radius and build version.
2025-02-09 04:30:19 +01:00
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