Commit Graph

34 Commits

Author SHA1 Message Date
TDSTOS
08f936fdff Update en_US.yml
Overhaul the kits section with new and improved messages
2026-04-13 09:47:24 +02:00
TDSTOS
098b481360 Update en_US.yml 2026-04-13 01:38:06 +02:00
TDSTOS
7589b05433 Replace TeamManager with PresetTeam GUI system
Replace the old dynamic /team invite system with a fixed GUI-based preset team implementation. Removes TeamManager, Team, TeamListener and the TeamCommand, and introduces PresetTeam, PresetTeamManager and GUI listeners/menus (TeamSelectionMenu/TeamSelectionListener). Codepaths that referenced teamManager were migrated to presetTeamManager (GameManager win/compass logic, Lunar rich presence, Oracle perk, scoreboards, tablist, lobby items). Lobby now shows a team wool item when teams are enabled and the tablist/scoreboard display and prefix logic were adapted to reflect preset teams. Configuration supports teams.enabled, teams.preset-count and teams.max-size; scheduled invite cleanup and old team-reset logic were removed accordingly.
2026-04-13 01:23:29 +02:00
TDSTOS
753aeb6dc1 Display variant and style in UI and Discord
Include the configured lunarclient.variantName in the game start Discord embed and expose both the lunar variant and the player's selected playstyle on the lobby/ingame scoreboards. Added placeholders to language file for variant and style. Files changed: GameManager.kt, ScoreboardManager.kt, and en_US.yml.
2026-04-12 20:38:23 +02:00
TDSTOS
4b379b9121 Add new perks and register them
Introduce five new perks (Berserker, Evasion, Gourmet, Last Stand, Momentum) with implementations and translations. SpeedHG.kt was updated to import and register these perks. en_US.yml was extended with display names, lore and messages for each perk. Brief mechanics:
- Berserker: increased melee damage below a health threshold.
- Evasion: chance to dodge projectiles (arrow/snowball/egg) with visual/sound feedback.
- Gourmet: grants short Regeneration I + Speed I when consuming mushroom stew.
- Last Stand: grants Resistance II + Absorption I when damage drops health below threshold (with cooldown).
- Momentum: awards Speed I after sprinting continuously for a configured duration; removed on combat or stopping sprint.
2026-04-12 19:32:32 +02:00
TDSTOS
aad1f0c9f9 Update en_US.yml 2026-04-12 11:42:53 +02:00
TDSTOS
4a28c58d2e Add /help command and various gameplay fixes
Introduce a HelpCommand (/help) and register it in SpeedHG; add its localized help text and plugin.yml entry. Prevent kit ability use while in gladiator by checking metadata in KitEventDispatcher and add a matching translation key. Early-return in KitCommand during ENDING state. Fix English message in TeamCommand and adjust spacing in LeaderboardMenu lore. Remove an unused import in SpeedHG and add necessary imports.
2026-04-12 07:20:20 +02:00
TDSTOS
18ee9937f8 Add ability feedback/particles; refactor kits
Introduce centralized AbilityFeedback and AbilityParticles utilities and update language strings. Refactor IceMage: replace old snowball mechanics with an aggressive Ice Spike Burst (cone projectiles, cooldown tracking, config keys) and a defensive snowball barrage with metadata; reorganize config accessors and passive behaviors. Refactor Ninja: add layered sounds/particles for teleport, rewrite smoke aura as an animated BukkitRunnable with visual rotation and enemy effects, and improve lifecycle/scheduling handling. Update en_US.yml with new kit item names, passive labels, and messages.
2026-04-12 05:38:22 +02:00
TDSTOS
55a00ee15c Add chat listener and fix ability height/fall logic
Add a ChatListener and register it to render chat with rank prefixes/colors. Enforce a maximum knockback altitude (MAX_KNOCKBACK_HEIGHT_Y) and block height-restricted ability use in Blitzcrank and BlackPanther; surface a localized height_restriction message. Add per-kit noFallDamage tracking for BlackPanther and Trident and cancel fall damage for flagged players in the KitEventDispatcher. Improve hitsRequired resolution: CustomGameSettings will treat a hardcoded 0 as an explicit cooldown-only value (never overridden) and the ActiveAbility getter now only accepts positive override values. Misc fixes: allow throwable items (potions/pearls) to bypass active-item handling, tighten ninja last-hit tracking, fix kit item drop detection in GameStateListener, tweak tablist prefix/suffix handling, and bump TheWorld ability cooldown from 20000ms to 25000ms. Also update language entries and minor formatting/cleanup.
2026-04-12 02:08:09 +02:00
TDSTOS
f00bd1d8f4 Add stats & leaderboard menus and lobby items
Add StatsMenu and LeaderboardMenu GUI implementations and wire them into the lobby hotbar. LobbyItemManager now builds a tutorial written-book, a player-head Profile & Stats item, and a leaderboard gold-ingot item, tags them with PDC keys, and opens the appropriate menu or book on interact. Leaderboard loads top-10 asynchronously from the stats manager. Also add corresponding language keys for item names/lores and menu titles.
2026-04-11 23:29:58 +02:00
TDSTOS
198275973e Translate Spielo kit UI/messages to English
Replace German UI strings in SpieloKit with English equivalents (inventory title, button labels, and click lore) and add full English localization for the Spielo kit in en_US.yml. Adds spielo kit entries including name, lore, item names/descriptions, and gamble result messages (instant_death, gamble_event, gamble_bad, gamble_neutral, gamble_good).
2026-04-11 22:57:19 +02:00
TDSTOS
f6eb654d47 Add Blitzcrank, Ninja and Trident kits
Add three new kits (Blitzcrank, Ninja, Trident) and register them in SpeedHG. Each kit includes full ability implementations (hook/stun/ult for Blitzcrank, teleport/smoke for Ninja, dive/parry for Trident) with their internal cooldowns, tasks and item handling. Update AbilityUtils.createBeam signature/logic (now accepts Player and improved beam stepping/hit detection) and adjust VenomKit to pass the player to createBeam. Extend en_US.yml with translations for the new kits and fix a few markup strings.
2026-04-11 05:36:31 +02:00
TDSTOS
da7e495374 Add ranking, feast guards and i18n updates
Use Rank info in leaderboard display (adds playerrank, passes numeric score) and adjust message placeholders. Add prefix placeholder injection in LanguageManager. Introduce max-radius-teleport config and use it for player teleport on join. Restore broadcasting of player quit messages on disconnect. Enforce no-iron crafting before feast (deny craft, notify player & play sound) and cancel entity spawns until feast starts. Update config.yml with max-radius-teleport and refresh en_US language strings (add no_iron_before_feast and translate/update several GUI/perk entries).
2026-04-11 01:41:50 +02:00
TDSTOS
0896bc85a5 Add LobbyItemManager; PDC support; misc fixes
Introduce LobbyItemManager to provide interactive lobby hotbar items (kits & perks) tagged via PersistentDataContainer and open the appropriate GUIs. Wire the manager into SpeedHG (field, init, event registration) and clear lobby items at game start in GameManager. Add ItemBuilder.pdc helper and necessary imports for setting PDC. Fix potion duration calculation to use invincibilityTime*20. Change AnchorKit icon/trigger material to ANVIL. Update config (border start/end/shrink and disable anti-runner) and update en_US language entries (lobby item names, leaderboard format, kit lore/formatting and small text fixes).
2026-04-11 01:18:38 +02:00
TDSTOS
4d32fe677c Add team system and team-based win condition
Introduce a full in-memory team system and integrate it into gameplay and UI.

- Add Team, TeamManager, TeamListener and TeamCommand to manage teams, invites, accept/deny, leave, kick and info. TeamManager stores teams and pending invites (INVITE_TTL_MS) using concurrent maps and exposes helper/query methods (areInSameTeam, allAliveInSameTeam, getInviterFor, cleanExpiredInvites, reset).
- Wire TeamManager into SpeedHG: initialize, schedule periodic invite cleanup, register command and listener, and reset teams on plugin disable.
- Update GameManager to consider teams for win conditions, build team winner names, exclude teammates from random teleport/compass logic, and credit all winning team members for stats/ranking.
- Move ability charge feedback out of individual kits into KitEventDispatcher: remove per-kit onFullyCharged overrides and add centralized ActionBar/sound feedback (sendChargeUpdateActionBar/sendChargeReadyActionBar). ActiveAbility no longer defines onFullyCharged.
- Make OraclePerk ignore teammates when finding nearest enemy.
- Add config entries for teams and corresponding language strings; tweak some default values in CustomGameSettings (gladiator arena radius/height and minor formatting changes).

These changes enable 2-player teams (configurable), friendly-fire prevention, invite lifecycle handling, and team-aware endgame logic.
2026-04-09 02:33:14 +02:00
TDSTOS
1c6b229ad8 Add Anchor, Puppet, Tesla kits and perks
Introduce three new kits (Anchor, Puppet, Tesla) and multiple perks, plus related plumbing and behavior changes. Key changes:

- Added kit implementations: AnchorKit (summon iron-golem anchor, knockback resistance/radius effects), PuppetKit (life-drain / fear abilities), TeslaKit (lightning active + passive knockback/fire aura).
- Register new kits and register new perks in SpeedHG startup.
- Added new perks: AdrenalinePerk (post-damage speed proc with cooldown), EnderbluePerk (ender-pearl fall damage handling), Ghost, Pyromaniac, Scavenger (and updated OraclePerk/PerkEventDispatcher usage).
- Extended Perk API (Perk.kt) with onEnderPearlDamage and onPostDamage hooks to support specialized damage handling and post-damage checks.
- PerkManager.isGhost added for checking Ghost perk selection and used to exclude ghost players from targeting/compass logic.
- GameManager.updateCompass now excludes ghost-perk players when computing compass targets.
- Updated PerkEventDispatcher and OraclePerk to integrate new hooks and behaviors.
- Minor language additions in en_US.yml to support new kits/perks.

These changes add new gameplay mechanics and ensure correct event dispatching for pearl/fall/post-damage cases and ghost invisibility to game tracking.
2026-04-08 02:59:32 +02:00
TDSTOS
1382de63fc Add natural disasters system
Introduce a natural-disasters feature: add DisasterManager, an abstract NaturalDisaster base class, and four concrete implementations (Earthquake, Meteor, Thunder, Tornado). Integrate the manager into SpeedHG (property, initialization/start) so disasters run on a timed cycle with guards for game state, grace period and per-disaster validation. Implementations: Meteor spawns a non-destructive LargeFireball impact, Earthquake applies nausea/impulses and particles, Thunder triggers multiple lightning strikes with fire chance, Tornado creates a particle vortex and pulls nearby players (uses a coroutine for precomputation). Add localization keys for disaster warnings in en_US.yml. Safety/cancel logic and flight/timeout cutoffs included to avoid leaks or invalid triggers.
2026-04-04 07:13:39 +02:00
TDSTOS
8c2ab684bb Add perk system with GUI and integrations
Introduce a complete passive perk system: Perk base class, PerkManager (registration, selection, lifecycle, persistence), and PlayerPerksRepository (DB schema + upsert/find). Add four example perks (Oracle, Vampire, Featherweight, Bloodlust) and a single PerkEventDispatcher to route combat/environment/kill events to active perks. Provide PerkSelectorMenu GUI and /perks command, integrate perk initialization, registration, application and cleanup into SpeedHG and GameManager, and hook load/evict into StatsListener. Also add language entries and register the command in plugin.yml. This change enables players to select up to two passive perks, persists selections, and dispatches relevant events to perk implementations.
2026-04-04 03:16:43 +02:00
TDSTOS
7b6557122b Add ranking system and /ranking command
Introduce a ranking system: add Rank enum and RankingManager enhancements (isRankingEnabled toggle, getRank(), RR change handling, rank-up/down detection and player notifications with titles/sounds). Add a new /ranking admin command (toggle, status, rank) with tab completion and register it in plugin startup. Surface player rank on the scoreboard (ScoreboardManager) and add related language entries and plugin.yml permission/command metadata. Logging updated to include ranked state.
2026-04-03 22:28:56 +02:00
TDSTOS
ab976cc2a4 Add RankingManager and integrate RR system
Introduce a new RankingManager that implements a per-round Rank Rating (RR) system (placement + kill-based scoring, placement games, kill caps and RR interpolation). Wire the manager into the plugin (SpeedHG): add field + initialization. Integrate into GameManager: call startRound at game start, registerRoundKill on kills, and onPlayerResult for eliminated players and the winner; adjust some stats calls (addLoss/addWin kept alongside ranking updates). Add corresponding English language messages for placement progress and result notifications.
2026-04-03 19:27:04 +02:00
TDSTOS
184443b7c6 Add custom game settings
Each kit now supports custom settings aswell as custom game settings like min_players
2026-03-28 23:51:32 +01:00
TDSTOS
5b00b51193 Update GUI-System
The GUI-System now gets its messages from the en_US.yml file for better customizability
2026-03-28 17:32:23 +01:00
TDSTOS
bab703601e Add four new kits and kit event hooks
Introduce Armorer, BlackPanther, Rattlesnake and Voodoo kit implementations and wire them into the plugin. Add new Kit hooks (onKillEnemy, onToggleSneak, onItemBreak) and PassiveAbility.onKillEnemy so kits can react to kills and item/sneak events. Update KitEventDispatcher to dispatch kill, sneak-toggle and item-break events, handle BlackPanther push-projectiles, and expose the ICE/black-panther PDC keys. Register the new kits in SpeedHG and add language entries for Rattlesnake and Armorer messages.
2026-03-28 17:23:39 +01:00
TDSTOS
8e96a07a65 Add timer command, recraft module & recipes
Introduce a /timer admin command with tab completion (speedhg.admin.timer) and a parseTimeToSeconds utility; add CommandSender.sendMsg extension and language strings. Add RecraftManager module that enforces a configurable recraft-nerf (reduces extra recraft points for alive players) and starts from GameManager; wire the new module into GameManager. Register mushroom-stew shapeless recipes for cocoa and cactus in plugin startup and tidy command registration. Update plugin.yml with permission/command entries and adjust imports as needed.
2026-03-27 16:26:18 +01:00
TDSTOS
07c2963e71 Add Feast, Pit modules and Discord webhook
Introduce two new game modules (FeastManager and PitManager) to handle timed endgame events: announcements, world edits, loot generation, teleportation and escape-prevention logic. Add DiscordWebhookManager to send asynchronous webhook messages (embeds/text) and wire it into SpeedHG and GameManager to broadcast game start/end events. Integrate managers into the game loop and reset lifecycle (startGame), add config entries for Discord, and add corresponding language strings. Also include small tweaks (killer XP reward, minor formatting) and updated resource files.
2026-03-27 02:15:44 +01:00
TDSTOS
72a58fdd9c Add Kit GUI (menu/anvil) and integrate MenuListener
Introduce a full chest-based kit selection UI and anvil search: add Menu, MenuHolder, KitSelectorMenu, KitItemFactory, AnvilSearchMenu (with AnvilSearchTracker) and a central MenuListener to dispatch menu and anvil interactions. Integrate the GUI into KitCommand (opens selector on no args, enforces mid-game selection rules, remove/replace backup kits when switching) and register MenuListener in the main plugin. Add permission speedhg.bypass and update ConnectListener to kick joiners when a game is running unless they have the bypass permission. Remove static playstyle lore from language file (now rendered dynamically), and apply small import/refactor cleanups (use wildcard imports for kit impls, java.util.* replacements).
2026-03-26 17:06:40 +01:00
TDSTOS
b2edcff447 Add Gladiator kit and WorldEdit support
Introduce the Gladiator kit feature and supporting infrastructure: add KitMetaData enum and new GladiatorKit implementation (items, abilities, fight lifecycle and region logic), register the kit in SpeedHG, and add language entries for the kit and some bolded kit names. Add WorldEditUtils.createCylinder helper to build/tear down arenas. Extend KitEventDispatcher with listeners to handle gladiator arena block interactions and explosion handling (with a helper to step glass color -> air). Also add ingame guards in several projectile handlers and remove a small TODO/comment in GameStateListener.
2026-03-26 04:13:26 +01:00
TDSTOS
2d720d962c Add persistent player stats and DB support
Introduce MySQL persistence and an in-memory stats system with async saving.

- Add HikariCP & MySQL connector dependencies and relocate libs in build.gradle.kts.
- Add DatabaseManager (HikariCP) to manage connection pool and lifecycle.
- Add PlayerStats data model and PlayerStatsRepository for table creation, reads, upserts and batch upserts (with prepared statements).
- Add StatsManager: coroutine-based cache, dirty-flags, async batch saves, auto-save (every 5 minutes), load/save APIs and shutdown save.
- Add StatsListener: load on AsyncPlayerPreLoginEvent and save on PlayerQuitEvent.
- Wire DB and stats into main plugin: connect on enable (disable plugin on fail), initialize StatsManager, save/disconnect on disable, register leaderboard command and stats listener.
- Update GameManager to record kills/wins/deaths and adjust scrimScore on events.
- Add LeaderboardCommand and language entries for leaderboard output; expose command in plugin.yml.
- Add database configuration section to config.yml.
- Minor refactor: KitCommand plugin accessor changed to a getter.

These changes provide a robust, pooled DB connection and efficient stats persistence (batched/upserted) to reduce DB load and ensure data safety during shutdown.
2026-03-26 00:10:26 +01:00
TDSTOS
ee79dd4bf4 Add Venom kit and integrate into game
Introduce a new Venom kit with aggressive (deafening wither beam) and defensive (shield of darkness) abilities by adding src/main/kotlin/.../VenomKit.kt. Wire the kit into the plugin: import and register Venom in SpeedHG (extracted registerKits()), and extend KitEventDispatcher to handle projectile interactions for Venom defensive playstyle (cancel/stop projectiles and reflect thrown potions). Update en_US.yml: add Venom localization/messages, adjust default prefix and some kit/scoreboard copytext, and add a no_permission message.
2026-03-25 23:33:57 +01:00
TDSTOS
39622672bd Update GameManager 2026-03-25 18:32:28 +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
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
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