Commit Graph

123 Commits

Author SHA1 Message Date
TDSTOS
f248182e84 Add new perks and kit
4 new perks have been added:
- Ironclad
- Scorch
- Tenacity
- Tracker

1 new kit has been added:
- Alchemist
2026-04-16 23:26:47 +02:00
TDSTOS
400a6c274a Fix blitzcrank fishing rod 2026-04-16 22:38:05 +02:00
TDSTOS
ee4601e102 Fix McScrimsAPI implementation 2026-04-15 22:55:46 +02:00
TDSTOS
176bd7e533 Change VolcanoAPI to McScrimsAPI 2026-04-15 21:51:35 +02:00
TDSTOS
50a8a4efe7 Update README.md 2026-04-14 05:07:56 +02:00
TDSTOS
da23a13357 Fix feast spawn
The feast now cannot be blocked by trees or other things
2026-04-14 05:01:23 +02:00
TDSTOS
b48ccef3ac Update OraclePerk; improve game management
OraclePerk now implements the SpieloKit; instead of removing mobs, the GameManager now sets the difficulty to peaceful in lobby / starting & ending state
2026-04-14 04:28:46 +02:00
TDSTOS
86435a9dec Add new command; update kit command
A new command /kitinfo has been added to provide information about kits / perks at any time. The command /kit now also works in invincibility for players without kits. Sounds when picking up items has been removed
2026-04-14 00:43:36 +02:00
TDSTOS
2b875399e8 Fix 9 bugs and features
9 identified bugs have been fixed, aswell as the podium where you would not spawn in the middle and missing messages
2026-04-14 00:23:29 +02:00
TDSTOS
445618ffaf Update invis time; fix perk momentum
Invincibility time has been increased to 120 seconds; MomentumPerk now doesn't cancel speed in invis
2026-04-13 23:43:45 +02:00
TDSTOS
08f936fdff Update en_US.yml
Overhaul the kits section with new and improved messages
2026-04-13 09:47:24 +02:00
TDSTOS
f3f025a51e Update GameStateListener.kt
Fix block breaking
2026-04-13 04:36:16 +02:00
TDSTOS
b526b85262 Optimize code; memory-leaks, race-condition
Fix bugs like StackOverflow, Thread-Leak, or Race-Condition. Optimize code generally
2026-04-13 02:42:24 +02:00
TDSTOS
f9dba5b10d Add HungerListener to slow player hunger
Introduce HungerListener to reduce player exhaustion during active game states, slowing vanilla hunger loss. The listener multiplies EntityExhaustionEvent.exhaustion for Player entities by EXHAUSTION_MULTIPLIER (default 0.5) and does nothing in the LOBBY state. Also register the new listener in SpeedHG so it's active at runtime. The multiplier is configurable in the listener's companion object.
2026-04-13 02:32:48 +02:00
TDSTOS
8cea132c6a Update GameManager.kt
Add GameRule to deactivate advancements announcement
2026-04-13 01:57:32 +02:00
TDSTOS
098b481360 Update en_US.yml 2026-04-13 01:38:06 +02:00
TDSTOS
cb038f48c4 Auto-assign teamless players; remove tablist reset
Call assignTeamlessPlayers() at game start and add helper to auto-assign online players without a team into preset teams. The helper computes the minimal number of active teams based on maxTeamSize, fills non-full teams (choosing the smallest), logs assignments, and is a no-op if preset teams are disabled. Also remove the automatic tab-prefix refresh when a player leaves a team in PresetTeamManager (prefix handling moved/changed elsewhere).
2026-04-13 01:34:59 +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
77560a7486 Update ConnectListener.kt 2026-04-13 00:43:44 +02:00
TDSTOS
bcfe42b1a3 Add 1.8 knockback + various gameplay fixes
Introduce a Paper EntityKnockback-based KnockbackListener implementing classic 1.8-style horizontal knockback (configurable via kits.knockback.extras) and register it in the main plugin.

Other changes:
- Reduce default freeze duration from 200 to 60 ticks in CustomGameSettings and TheWorldKit (3s). Remove the per-freeze hit cap and related logic from TheWorldKit; freezes are now purely timer-based and the FrozenData no longer tracks hitsRemaining. Refactor freeze task/timer logic and cleanup unused imports.
- Fix FeastManager chest creation race by reading chest BlockState on the next tick (schedule runTaskLater) before filling/updating the chest.
- Refactor GameStateListener block handling: always-block diamond ore, block iron before feast, restrict allowed blocks during INVINCIBILITY to a whitelist, and unify INGAME pickup behavior to directly add drops to player inventory. Use block.getDrops(tool, player) to preserve correct vanilla drop context (fortune/silk/age). Rework pickupBlock to use those drops and ensure sound selection logic remains correct.
- Add mushroom harvesting handling: track active mushroom breaker players and handle mushroom chain physics in BlockPhysicsEvent to attribute drops to the correct player (activeMushroomBreaker map + monitor handler). Remove item-despawn cancellation logic.

These changes address physics/race bugs, improve combat feel (1.8 KB), simplify freeze behavior for The World kit, and ensure drop attribution and vanilla drop mechanics are preserved.
2026-04-13 00:38:32 +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
ed9b95ae7a Update ConnectListener.kt 2026-04-12 19:47:36 +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
72cc136658 Update TablistManager.kt 2026-04-12 19:25:08 +02:00
TDSTOS
adb458213a Update WorldManager.kt 2026-04-12 12:56:42 +02:00
TDSTOS
b95e05da24 Initialize world border on startup
Add a delayed task (runTaskLater 10L) that retrieves the "world" and configures its WorldBorder: center at (0,0,0), size set to startBorder, damageBuffer set to 0.0 and damageAmount set to 1.0. Ensures the world border is initialized shortly after plugin startup/world load.
2026-04-12 12:56:14 +02:00
TDSTOS
c261a3a07c Improve world archive extraction and safety
Refactor WorldManager to reliably extract map archives and harden extraction.

- Add documentation and ARCHIVE_ROOT constant for expected archive layout (must contain a leading "world/" folder).
- Fix archive type detection (use file.name) and ensure target world folder exists before extraction.
- Implement unzip and untar that strip the leading "world/" prefix, skip the bare root entry, and log unexpected entries.
- Add Zip Slip guards for both ZIP and TAR extraction to prevent path traversal.
- Use buffered input for tar.gz performance and correct tar entry iteration.
- Add extractAsync helper to run I/O off the main thread and invoke a completion callback on the main thread (for potential onEnable migration).
- Improve logging and error messages.
2026-04-12 12:39:19 +02:00
TDSTOS
26a29e8ba9 Support .tar.gz maps and map-system toggle
Add Apache Commons Compress dependency and relocate its packages for shading. Introduce a config guard (map-system.enabled) in SpeedHG.onWorldInit and DataPackManager.install to skip internal map handling when an external map system is enabled. Add untar() to WorldManager using TarArchiveInputStream + GzipCompressorInputStream and update extraction logic to handle .zip and .gz (.tar.gz) archives, extracting to the world parent folder as needed.
2026-04-12 12:26:53 +02:00
TDSTOS
7005546e21 Update LobbyAnnouncer.kt 2026-04-12 11:44:19 +02:00
TDSTOS
aad1f0c9f9 Update en_US.yml 2026-04-12 11:42:53 +02:00
TDSTOS
159cf9155d Require fully-charged hits for kit abilities
Add a guard that returns early unless the attacker's cooled attack strength (getCooledAttackStrength(0f)) is at least 0.9 (≥90%). This prevents spam-clicks from accumulating kit hit-counters after the AttackSpeed attribute change, ensuring only fully charged swings trigger kit ability logic; the check is performed before resolving attacker kit/playstyle/charge data.
2026-04-12 10:14:28 +02:00
TDSTOS
7d7a57b99b Increase attack nerfs and base attack speed
Raise weapon nerf multipliers (swordNerf from 0.5 to 0.75, otherNerf from 0.2 to 0.4) and increase players' GENERIC_ATTACK_SPEED base value on join/quit from 2.0 to 8.0. These adjustments rebalance damage/nerf scaling with the higher default attack speed. Also contains minor whitespace cleanup in the listener file.
2026-04-12 10:10:59 +02:00
TDSTOS
a08908d66f Reset player attack speed on join/quit
Add handlers for PlayerJoinEvent and PlayerQuitEvent that reset a player's GENERIC_ATTACK_SPEED base value to 2.0. Introduces a private setAttackSpeed helper and imports Attribute; ensures players have consistent attack speed when they join or leave the server.
2026-04-12 10:08:09 +02:00
TDSTOS
fd348a86e9 Consolidate ability particle utilities
Remove separate AbilityFeedback and AbilityParticles utilities and consolidate particle helpers into AbilityUtils. Add drawColoredParticleLine, drawGenericParticleLine and a spawnParticleLine helper to centralize line-particle logic (with Color/DustOptions support), and remove the old drawParticleLine and runForNearbyPlayers implementations. Update PuppetKit to use AbilityUtils.drawColoredParticleLine (and import Color) and remove the direct heart particle spawn. This refactors and centralizes particle/feedback behaviour for reuse and clearer APIs.
2026-04-12 07:39:57 +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
140ee8ef3e Exclude kit items from drops on death
Prevent players from dropping kit-owned items when they die by filtering out kit items before dropping inventory contents. Added KitManager.isKitItem(player, item) which checks the player's selected kit and compares against the kit's cached items (using isSimilar). Also added the ItemStack import required for the new method.
2026-04-12 05:45:04 +02:00
Laurin
a60241358b Update status of abilities to 'Fertig'
Signed-off-by: Laurin <100531026+TDSTOS@users.noreply.github.com>
2026-04-12 05:39:26 +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
8ff4dee6bf Update SpeedHG.kt 2026-04-12 05:14:13 +02:00
TDSTOS
c986c4b593 Add LobbyAnnouncer with beta broadcasts
Introduce a LobbyAnnouncer module that periodically broadcasts a MiniMessage announcement during the LOBBY state. The new class (game/modules/LobbyAnnouncer.kt) schedules broadcasts every 30 seconds when the new config flag game.beta is true and provides start/stop lifecycle methods. Integrate the announcer into the main plugin (SpeedHG.kt) by adding a lobbyAnnouncer field and starting it during initialization. Also update config.yml to add game.beta: true and change teams.enabled from true to false.
2026-04-12 05:13:50 +02:00
TDSTOS
5a828a3993 Add live config overrides and refactor kits
Introduce runtime-configurable settings and defaults across multiple kits and clean up implementations. Kits (Armorer, Backup, Gladiator, Goblin, IceMage, Puppet, and others) now expose companion-object default constants and read values via override() (SPEEDHG_CUSTOM_SETTINGS) with typed accessors. Activation and tick-time behaviour snapshot these values so mid-round config changes don't produce inconsistent effects. Also includes general refactors: clearer getters, small API/formatting cleanup, improved no-op ability placeholders, and minor behavior protections (e.g. disallow stealing Backup kit).
2026-04-12 05:06:43 +02:00
TDSTOS
411b77cc8d Make kit parameters configurable and refactor
Introduce live-configurable parameters and refactor three kits (Anchor, BlackPanther, Blitzcrank).

- AnchorKit: replace hardcoded constants with default values + live config accessors (partial_resistance, golem_hp, radii, bonus dmg, monitor interval). Snapshot config on activation, update doc comments to JSON keys, minor API/formatting cleanup, and make passive/active logic use dynamic radii and damages.
- BlackPantherKit: add defaults and live getters for fist mode, push, pounce and extras (push_knockback_speed/y, fist_mode_damage, projectile_delay_ticks). Snapshot values on activate, update docs to expose JSON keys, and small behavioral formatting fixes.
- BlitzcrankKit: add defaults and live getters for hook, stun and ult settings (range, pull_strength, radii, durations, cooldown, raycast params), update docs and remove unused imports; snapshot config where needed.

Also: several minor code cleanups (whitespace/formatting, removal of unused imports, fully qualified event references) and improved in-code documentation for custom settings. These changes enable per-kit overrides via SPEEDHG_CUSTOM_SETTINGS and make runtime behavior consistent by snapshotting values at ability execution.
2026-04-12 04:08:08 +02:00
TDSTOS
c1be2ddabd Add extensible kit config and use in kits
Introduce a generic `extras` map and typed accessors to CustomGameSettings.KitOverride (getLong/getInt/getDouble/getFloat/getBoolean) and add documentation/examples for runtime JSON overrides. Expose Kit.override() to return the live KitOverride from SpeedHG and document how kits should read config values. Refactor NinjaKit to read all runtime parameters from overrides (teleport cooldown, hit window, smoke radius/duration/refresh/effect), snapshot config at activation, simplify smoke rendering/logic, and clean up cooldown/teleport code. Refactor TheWorldKit to use typed override fields and extras (shockwave, blink and freeze settings), snapshot values for abilities, tidy particle/physics code and improve lifecycle handling. Miscellaneous formatting, comments and small API cleanups across files.
2026-04-12 03:13:06 +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
92260d90cb Add bullet icons to leaderboard lore entries
Replace the previous plain gray label lines in the leaderboard item lore with a dark_gray '▪' bullet followed by a gray label and the value (applies to Rank, Score, Kills, K/D, Wins, and Win Rate). Also tidy minor spacing around the meta.lore call. Purely cosmetic formatting changes to improve readability of the leaderboard tooltips.
2026-04-11 23:47:29 +02:00
TDSTOS
4dd53b4c9b Update ItemBuilder.kt 2026-04-11 23:43:33 +02:00
TDSTOS
8e960e4e62 Update ItemBuilder.kt 2026-04-11 23:41:18 +02:00
TDSTOS
0cbed26ad0 Update ServerRankProvider.kt 2026-04-11 23:30:43 +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
cdef2315d0 Sort kits and perks by ID
Ensure kits and perks are displayed in alphabetical order by their ID. KitSelectorMenu.getFilteredKits now returns a sorted list (preserving search filtering) and PerkSelectorMenu uses a new getFilteredPerks() helper that returns perks sorted by id, improving menu ordering and consistency.
2026-04-11 23:09:55 +02:00