3ba6f303f8
Add WorldGuard auto-region creation and split ConfigLoader
...
- Add WorldGuardConfig with template-based naming ({mine_name}_{random_4}, etc.)
- Add WorldGuardRegionService for creating/updating/deleting WG regions
- Add WorldGuardConfigLoader for parsing WG config from YAML
- Add configurable flags, owners, members for WG regions
- Update MineConfig to include worldGuard section
- Update Mines.java to create/delete WG regions on mine create/delete
- Update MineFileManager to load WG defaults from defaults.yml
- Split ConfigLoader into specialized loaders:
- BlockConfigLoader, RegionConfigLoader, ResetConfigLoader
- RewardConfigLoader, TeleportConfigLoader, UIConfigLoader
- Reduce ConfigLoader from 427 lines to 151 lines
- Update defaults.yml with WorldGuard configuration section
2026-05-31 22:39:01 +02:00
a9c8a0c323
feat(gui): add mine editor GUI system
...
New GUI classes:
- MineEditGui.java - main editor with navigation to sub-editors
- MineEditGuiHolder.java - inventory holder for editor
- ConfirmDeleteGui.java - confirmation dialog for mine deletion
- ConfirmDeleteGuiHolder.java - inventory holder for confirmation
- MineEditGuiListener.java - handles clicks in editor GUIs
Updated:
- AdminCommands.java - add /lm edit <mine> command
- RegistrationManager.java - register MineEditGuiListener
- plugin.yml - add lomines.admin.edit permission
Features:
- Visual editor showing mine configuration sections
- Blocks, Regions, Reset, Rewards, Teleport, UI sections
- Save and Delete actions with confirmation
- Info panel showing mine status (blocks, volume, percent)
Sub-editors (placeholder, to be implemented):
- BlockEditGui - edit block types and weights
- ResetEditGui - edit reset interval and triggers
- RewardEditGui - edit mining rewards
- TeleportEditGui - edit teleport on reset
- UIEditGui - edit action bar settings
2026-05-31 22:23:46 +02:00
8b8b9fee18
refactor(core): update all classes for new config system + add tab completion
...
BREAKING CHANGE: Core classes updated to use new section-based config
Updated classes:
- Mine.java - uses RegionConfig, BlockConfig, new FillMode
- Mines.java - uses new ConfigLoader.ConfigLoadException
- MineFileManager.java - creates configs with new system
- MineRepository.java - uses new ConfigLoader
- MaskScanService.java - uses BlockKey for markers
- BukkitBlockSetter.java - uses Map<BlockKey, Double>
Handlers updated:
- ActionBarHandler.java - uses UIConfig with MiniMessage
- MineBlockHandler.java - uses ResetConfig
- MineRewardHandler.java - uses RewardConfig
- MineResetHandler.java - uses new config sections
Commands updated:
- MaskCommands.java - updated exception handling
Added:
- LoMinesTabCompleter.java - Bukkit tab completion for all commands
- RegistrationManager.registerTabCompleter() - registers tab completer
Removed:
- Old ConfigLoaderTest.java (uses deprecated config system)
All classes now use:
- Type-safe BlockKey instead of String
- Section-based config (region, blocks, reset, rewards, ui, teleport)
- Duration-based intervals instead of ticks
- MiniMessage formatting for action bar
2026-05-31 22:13:50 +02:00
f1060f34d4
refactor(config): complete rewrite of configuration system
...
BREAKING CHANGE: New section-based configuration format
New Features:
- Type-safe BlockKey sealed interface (Vanilla, Oraxen, ItemsAdder)
- Section-based config: RegionConfig, BlockConfig, ResetConfig, RewardConfig, UIConfig, TeleportConfig
- Human-readable durations: 5m, 30s, 2h, 1d
- YAML inheritance from defaults.yml
- MiniMessage support for action bar and item names
- Immutable config records with validation
Removed:
- Legacy MineConfig (17-field god object)
- ConfigParser, ConfigValidator, ConfigSerializer split classes
- Legacy FillMode enum (replaced with better version)
- Old ConfigLoader with complex parsing logic
New Files:
- data/config/block/BlockKey.java - sealed interface for block types
- data/config/block/BlockConfig.java - type-safe block weights
- data/config/block/FillMode.java - fill strategies
- data/config/region/RegionConfig.java - region management
- data/config/reset/ResetConfig.java - reset behavior with Duration
- data/config/reward/RewardConfig.java - rewards with ItemReward
- data/config/teleport/TeleportConfig.java - teleport on reset
- data/config/ui/UIConfig.java - action bar and messages
- data/config/MineConfig.java - composed from sections
- data/config/ConfigLoader.java - clean loader with defaults inheritance
- defaults.yml - default configuration template
Tests:
- BlockKeyTest.java - serialization/deserialization
- BlockConfigTest.java - weight normalization, validation
- ResetConfigTest.java - duration parsing, defaults
- UIConfigTest.java - timer formatting, action bar
- MineConfigTest.java - builder, defaults, validation
2026-05-31 21:57:10 +02:00
f4e9458544
refactor: migrate package from com.loki to dev.loki
...
- Change base package from com.loki to dev.loki across all Java files
- Update plugin.yml main class path
- Fix ConfigParseException imports in test files
- Update build.gradle.kts relocate patterns
- Add missing imports in ConfigLoaderTest.java
- Update TODO.md with current status
BREAKING CHANGE: Package namespace changed from com.loki to dev.loki
2026-05-31 21:34:44 +02:00