Commit graph

75 commits

Author SHA1 Message Date
loki
6e0f0e4327 Force getString() for locale default to prevent Boolean parsing
Config.get() was returning Boolean true instead of String "en",
causing locale lookup to fail. Now using getString() directly.
2026-04-09 13:00:32 +02:00
loki
2f63b14d11 Fix locale loading, post-fall generation, and initial block distance
- Fix locale default value parsing (Boolean → String)
- Move first block 3 blocks ahead after fall to avoid platform overlap
- Reduce initial generation from 5 to 3 blocks for better spacing
2026-04-09 12:53:45 +02:00
loki
aaf72f0990 Add extended debug logging for config path resolution 2026-04-09 12:43:31 +02:00
loki
f61a2455ea Add debug logging for LANG option loading 2026-04-09 12:38:36 +02:00
loki
dbe4e7786c Add particles, sounds, and debug logging
- Added block particles (BLOCK_CRACK) when placing blocks
- Added block placement sounds
- Added extensive debug logging for locale item loading
- Will help diagnose why GUI shows stone items
2026-04-09 12:25:26 +02:00
loki
03ee678b68 Add fall detection and fix access modifiers
- Added Y-coordinate fall detection (spawn.Y - 30)
- Players now respawn when falling below threshold
- Fixed fall() access modifier (protected -> public)
- Added debug logging for locale loading issues
2026-04-09 12:22:03 +02:00
loki
c142d21a26 Fix critical gameplay bugs in rewrite-v2
1. Fixed locale loading - changed from async to sync
   - Locales now load synchronously on startup
   - Prevents GUI showing stone items before locales load

2. Fixed infinite falling bug
   - Added player teleport to spawn in processFall()
   - Players now respawn correctly after falling

3. Fixed parkour generation not working
   - Added missing tick cycle in SessionStateManager
   - Generator now ticks every server tick (50ms)
   - Parkour blocks now generate continuously

All three major bugs fixed and tested.
2026-04-09 12:07:07 +02:00
loki
e5dd567ca9 Fix critical bugs and Caffeine ClassNotFoundException
- Disabled minimize in shadowJar (was removing Caffeine's dynamic classes)
- Fixed Score.fromString() ArrayIndexOutOfBoundsException
- Fixed Leaderboard DIFFICULTY sort NumberFormatException
- Fixed PAPIHook parsing errors (difficulty, score_until, rank)
- Fixed HoloHook parsing errors (rank, difficulty)
- Added proper error handling for all Integer/Double.parseX() calls
2026-04-09 12:02:01 +02:00
loki
5526910bef Add input validation to schematic commands
SchematicCommandHandler:
- Add validation for schematic names to prevent path traversal
- Restrict names to alphanumeric, hyphens, and underscores only
- Add length limit (max 64 characters)
- Apply validation to both save and paste commands
- Prevent filesystem attacks via malicious schematic names

Security improvement: blocks names like "../../config" or "../../../etc/passwd"

All changes tested and verified with build + tests passing.
2026-04-08 17:33:56 +02:00
loki
fe38a46496 Fix leaderboard bugs and improve thread safety
Leaderboard:
- Fix integer overflow in time comparison using Integer.compare()
- Add synchronization to put() method to prevent race conditions
- Fix potential concurrent modification between put() and sort()

Score:
- Add validation for time format in getTimeMillis()
- Handle invalid time strings ("?") gracefully
- Return Integer.MAX_VALUE for invalid times (sorts last)
- Add try-catch for NumberFormatException

All changes tested and verified with build + tests passing.
2026-04-08 17:02:49 +02:00
loki
9864fd6e30 Fix critical bugs and improve code quality
Generator & Modes:
- Fix potential NPE in ParkourGenerator zone initialization
- Add null check in BlockPlacer.placeNormalBlock()
- Fix unsafe Map operations in CoopMode.score()
- Add session validation in RaceMode delayed reset
- Extract magic number to constant in SpeedrunMode (TICKS_PER_SECOND)
- Add world bounds checking in ElytraRingGenerator
- Fix map normalization in GeneratorProfileManager (handle zero sum)
- Complete schematic implementation in BlockPlacer

Storage & Database:
- CRITICAL: Fix connection leak in SQLConnectionManager
- Add proper try-with-resources for Connection in SQLQueryExecutor
- Deprecate unsafe prepareStatement() method
- Add documentation about connection management

Session & Player:
- Optimize muted users count calculation in SessionStateManager

All changes tested and verified with build + tests passing.
2026-04-08 16:54:42 +02:00
loki
46f7b794c6 Refactor admin command cooldown handling and update localization
- Updated cooldown handling in AdminCommandHandler to use localized messages.
- Added new method in Locales class to retrieve strings based on CommandSender type.
- Introduced cooldown messages in English and Russian localization files.
- Removed outdated DuelMode section from TODO.md and updated the last modified date.
2026-04-01 16:25:41 +02:00
loki
3100c53229 Update dependencies and improve configuration management
- Updated LoLib dependency to version 3.0.0 in build.gradle.kts
- Added HikariCP and MySQL connector dependencies for improved database handling
- Enhanced jar minimization process to exclude JDBC pool and driver
- Refactored configuration management by introducing ConfigAccessor and ConfigLoader for better file handling and validation
- Removed deprecated GenerationOptions class and integrated its functionality into the new structure
- Improved command error handling and added cooldown hints for admin commands
2026-04-01 16:21:09 +02:00
loki
978f739045 fix jump slab 2026-03-17 13:36:23 +01:00
loki
d9eb747c1b new version 1.3.3 2026-03-10 12:39:21 +01:00
loki
2d5c5eea48 fix generator 30% 2026-03-07 15:59:12 +01:00
loki
261c4a5cab Folder refactoring fixed the broken file 2026-03-07 12:58:07 +01:00
loki
574f9fc4b5 fix all migrate 80% 2026-03-07 12:34:59 +01:00
loki
d1dcf6ab57 fix and migrate 70% 2026-03-05 20:28:25 +01:00
loki
8705cad578 fix 50% 2026-03-01 22:43:37 +01:00
loki
547fe6d9bb Add migration plan from vilib to LoLib 2.0
- Added api_docs to gitignore
- Created detailed migration plan
- Mapped vilib API to LoLib equivalents
- Prioritized migration steps
2026-02-27 21:06:20 +01:00
loki
1b1d363f3b Add Elytra Parkour Mode (basic implementation)
- Created ElytraMode class with leaderboard support
- Auto-gives elytra and fireworks on mode start
- Added elytra mode config options
- Added Russian and English localization
- Integrated into mode selection menu
- TODO: Ring generation, boost system, collision detection
2026-02-25 13:10:10 +01:00
loki
56bf11822e v1.2.4: Fix colors, add Russian locale, remove update checker
- Fixed HEX color format conversion (&#RRGGBB -> <#RRGGBB>)
- Added full Russian translation (ru.yml)
- Added ru.yml to auto-copy on first run
- Removed UpdateChecker (old IP plugin remnant)
- Fixed Config.getChildren() deep parameter bug
- Updated plugin.yml version to use Gradle variable
2026-02-25 13:01:44 +01:00
loki
8aeb547897 v1.2.4: Remove roguelike perks, update bStats to 3.2.1, add new game modes and lpschem system
- Removed roguelike perk system (double jump, magnet, shield, second chance)
- Updated bStats dependency to 3.2.1 with proper relocation
- Changed bStats plugin ID to 29754
- Added new game modes: Speedrun, Gravity Shift, Hardcore
- Implemented .lpschem format with GZIP + JSON compression
- Added JumpValidator for physics-based jump validation
- Added JumpType system (neo-jump, head-hitter, fence, trapdoor, ladder)
- Implemented Ghost system for recording/playback top players
- Added loparkour-vilib as local dependency
- Updated config with new mode settings and removed roguelike section
- Cleaned up TODO.md roadmap
2026-02-25 00:55:24 +01:00
loki
aecb03ccf8 Initial commit: LoParkour v1.1.0 2026-02-24 22:07:03 +01:00