Commit Graph

31 Commits

Author SHA1 Message Date
TDSTOS
9385269c50 Bump gradle version from 8.10 to 8.14.4 2026-03-25 17:51:22 +01:00
TDSTOS
cc57803f38 Optimize imports 2026-03-25 17:48:27 +01:00
TDSTOS
e199ae24d4 Add BackupKit and mid-game kit selection
Introduce a BackupKit and allow players holding it to change kits mid-game while preventing normal kits from being picked once the game started. Changes:
- Add BackupKit implementation (kit with no abilities/items used for mid-round kit selection).
- Update KitCommand: import BackupKit and GameState, add isIngame helper, disallow normal kit picks during INGAME/INVINCIBILITY, permit BackupKit to swap kits mid-game (but prevent picking the same kit) and apply playstyles accordingly.
- Fix GoblinKit to also copy/restore the target's playstyle when stealing a kit and restore the player's original playstyle after timeout.
- Tweak IceMageKit slow effect chance (now ~1/3 chance using random.nextInt(3) < 1).
- Update en_US.yml: add messages and kit strings for backup and icemage, adjust ability_charged color, and add game/cannot-pick messages.

Also includes small import and formatting adjustments.
2026-03-25 17:47:42 +01:00
TDSTOS
ea86272c01 Add IceMage kit and playstyle support
Introduce a new IceMage kit and wire playstyle support across the plugin. Changes include:

- Add IceMageKit with aggressive/defensive active & passive abilities, item distribution, and lifecycle hooks; caches ability instances and given items to reduce allocations.
- Register IceMageKit in SpeedHG on plugin startup.
- Update KitCommand to require a playstyle argument, validate it, select the kit's playstyle, and provide tab-completion for playstyles.
- Extend KitEventDispatcher with IceMage-specific handlers: spawn a circular volley of snowballs on ability use (cancelling the original projectile), mark spawned snowballs with persistent data, and apply freeze/slow effects on hit.
- Adjust GoblinKit to use a plugin getter and make inner ability classes static to avoid capturing the outer instance.
- Update language lines and plugin.yml usage to reflect the new /kit <kitName> <playstyle> usage.

These changes implement the IceMage feature and ensure proper playstyle selection and event handling while keeping allocations low and behavior consistent.
2026-03-25 05:02:59 +01:00
TDSTOS
19bd708b59 Refactor language, kits, and event handling
Major refactor and bugfixes across language loading, kit lifecycle, and event handling:

- LanguageManager: Introduce LangData to hold string and list entries, load YAML lists alongside strings, and centralize retrieval (avoid reloading files at access time).
- GameManager: Use apply {} to configure worldBorder more concisely.
- KitManager.clearAll: Handle offline players by cleaning chargeData without calling lifecycle hooks (onActivate/onDeactivate cannot run for offline players).
- GoblinKit: Track per-player steal BukkitTask, cancel tasks on kit removal, only restore kits if player is still alive, and fix inventory removal by removing cached items and cleaning cache.
- KitEventDispatcher: Use null-safe chaining for victim passive hooks and early-return on non-block-position moves to ignore head-rotation events.
- GameStateListener: Add feastStarted flag placeholder and adjust iron ore handling/messages; add TODO for DB update.
- Extensions: Change legacySerializer visibility to internal.

These changes improve stability around scheduled tasks, offline cleanup, and language list support.
2026-03-25 03:28:52 +01:00
TDSTOS
cc265a1dea Add language entries; include prefix placeholders
Include the default prefix as a placeholder when deserializing messages (LanguageManager). Pass the invincibility time placeholder in GameManager broadcasts. Unify GoblinKit action bar messages to a single "ability_charged" language key. ScoreboardManager now imports legacySerializer and serializes the selected kit display name for the scoreboard. Large update to en_US.yml: added many game/timer/title/antirunner/build/craft/commands translations, updated player welcome and scoreboard title coloring, and added kits.goblin names, lore, items and messages.
2026-03-25 03:09:17 +01:00
TDSTOS
72c461ab28 Add KitCommand 2026-03-25 02:37:16 +01:00
TDSTOS
9d6bd6a6b8 Add kit system, KitManager and Goblin kit
Introduce a full kit framework and supporting utilities.

- Add core kit API: Kit, Playstyle, ActiveAbility, PassiveAbility, AbilityResult, charge state and PlayerChargeData.
- Implement KitManager for registration, lobby selections, apply/remove/clear lifecycle and charge tracking.
- Add KitEventDispatcher listener to centralize kit event handling (interact, hits, move) and integrate passive/active hooks.
- Provide example kit implementations: GoblinKit (functional abilities) and TemplateKit (reference).
- Add utilities: ItemBuilder and WorldEditUtils (WorldEdit-based sphere creation).
- Integrate into plugin: SpeedHG now initialises KitManager, registers kits and KitEventDispatcher, applies kits at game start and clears on end.
- LanguageManager: add default message/list/component helpers.
- Build changes: bump Kotlin plugin to 2.2.0 and add WorldEdit compileOnly deps; also expose legacySerializer in Extensions.

These changes implement the kit feature set (items, abilities, charge/recharge flow) and wire it into the game lifecycle.
2026-03-25 02:27:53 +01:00
TDSTOS
e411879b20 Remove legacy modules, add language & scoreboard
Large refactor removing many legacy subsystems (abilities, kit system, database repos, recraft, world manager, extensive config classes, lunar/luckperms integrations and various listeners/commands). Introduces a lightweight LanguageManager, AntiRunningManager, ScoreboardManager, ConnectListener and a SoupListener; simplifies the main SpeedHG plugin to initialize these components and register the connection listener. Build changes: update Gradle wrapper to 8.10, remove paperweight and several external dependencies, add fr.mrmicky:fastboard and simplify shadowJar/build task configuration. Adds default language resource (languages/en_US.yml) and updates plugin/config resources. Purpose: simplify and decouple the plugin, reduce dependency surface and prepare for a leaner, modular rewrite.
2026-03-25 00:55:20 +01:00
TDSTOS
b4db8dbfeb Add messages 2025-12-12 05:12:14 +01:00
TDSTOS
bb47145a73 Fix start errors 2025-12-12 05:12:09 +01:00
TDSTOS
1acb5681fc Add kit inventory 2025-12-11 19:47:45 +01:00
TDSTOS
c741739cdd Update kits 2025-12-11 19:47:40 +01:00
TDSTOS
05e0e2dcf9 Fix game states 2025-12-11 19:47:25 +01:00
TDSTOS
31c1e6e316 Add player repository 2025-12-11 19:47:06 +01:00
Laurin
3092a19086 Updated plugin.yml 2025-12-11 18:15:39 +01:00
TDSTOS
1d7ff8bd2f Add new kit & register 2025-12-09 19:57:55 +01:00
TDSTOS
7e54c8e9f1 Add new kits & recraft nerf 2025-12-09 16:06:17 +01:00
TDSTOS
cb788930ad Fix kit construction 2025-12-09 01:07:50 +01:00
TDSTOS
728b7534ac Update kit management & anchor kit 2025-12-09 01:01:00 +01:00
Laurin
a3b521940c Added kits.yml 2025-12-08 23:37:37 +01:00
TDSTOS
fef0072007 Add new game states and update 2025-12-08 21:59:40 +01:00
Laurin
590318772f Update game states & world management 2025-12-06 05:41:42 +01:00
Laurin
2c10e3e7fd Add new game states 2025-12-04 15:01:10 +01:00
Laurin
ac185e35ce Cleanup ability context 2025-12-01 19:45:49 +01:00
Laurin
7634694b2e Added AbilityHitListener.kt 2025-12-01 19:35:33 +01:00
Laurin
e9bb8f9a90 Added package-lock.json 2025-12-01 19:35:32 +01:00
Laurin
5829770fea Cleanup game state 2025-12-01 03:58:51 +01:00
Laurin
486931b72f Added GameManager.kt 2025-12-01 03:47:50 +01:00
Laurin
dc1fdb56c4 Updated .gitignore 2025-12-01 03:46:14 +01:00
Laurin
0daabe3de2 First commit 2025-12-01 03:45:44 +01:00