Commit graph

82 commits

Author SHA1 Message Date
7c02b0407e refactor(gradient): разбить GradientColorCommand через Command pattern (255→68 строк)
Применен Command pattern с handlers:
- SubCommandHandler: интерфейс для обработчиков
- ColorOnHandler: включение градиента (40 строк)
- ColorOffHandler: выключение градиента (35 строк)
- ColorResetHandler: сброс градиента (40 строк)
- ColorCopyHandler: копирование градиента (90 строк)
- ColorSetHandler: установка цветов (95 строк)

Структура:
+ gradient/commands/handlers/color/SubCommandHandler.java
+ gradient/commands/handlers/color/ColorOnHandler.java
+ gradient/commands/handlers/color/ColorOffHandler.java
+ gradient/commands/handlers/color/ColorResetHandler.java
+ gradient/commands/handlers/color/ColorCopyHandler.java
+ gradient/commands/handlers/color/ColorSetHandler.java
~ gradient/commands/GradientColorCommand.java (255→68 строк)

Результат:
- GradientColorCommand уменьшен с 255 до 68 строк
- Каждый handler отвечает за одну подкоманду
- Улучшена тестируемость и расширяемость
2026-04-07 12:54:20 +02:00
bb78f1e60f refactor(config): разбить ConfigManager на 3 класса (312→80 строк)
Применен принцип Single Responsibility:
- ConfigLoader: загрузка и миграция версий конфига
- ConfigAccessor: доступ к значениям конфигурации
- ConfigManager: координатор, делегирует вызовы

Структура:
+ config/core/ConfigLoader.java (70 строк)
+ config/core/ConfigAccessor.java (185 строк)
~ config/ConfigManager.java (312→80 строк)

Результат:
- ConfigManager уменьшен с 312 до 80 строк
- Логика разделена по ответственности
- Улучшена читаемость и поддерживаемость
2026-04-07 12:52:34 +02:00
f45786c6af Рефакторинг: KISS принципы, разбиение god-классов, реорганизация
- Создан RatConfig.java с централизованными константами
- MuteServiceImpl: 261→170 строк (Strategy pattern)
- MessagingServiceImpl: 219→124 строк (3 отдельных сервиса)
- ServiceFactory для создания сервисов
- Реорганизованы директории: utils/, commands/moderation/, commands/admin/
- Все директории теперь ≤6 файлов
2026-04-07 12:48:23 +02:00
6119feafcf chore: add GPL v3 license and update test artifacts
- Add LICENSE file with GNU General Public License v3
- Update README.md documentation
- Rebuild ChatFormatterTest class with latest changes
- Ensure project licensing compliance and clarity
2026-04-06 00:45:29 +02:00
4f6eaf35e9 chore: clean up documentation and rebuild with badwords filter
- Remove outdated CODE_REVIEW_RU.md and REFACTORING_SERVICES.md documentation
- Add badwords.txt resource file for swear filter functionality
- Rebuild compiled classes with updated filter and configuration logic
- Update all configuration files (appearance, discord, filters, messages)
- Rebuild core components: ConfigManager, PluginInitializer, SwearFilter, GradientModule, PrefixService, PlayerEventListener, EnhancedChatRenderer
- Consolidate build artifacts with source changes for consistency
2026-04-06 00:38:34 +02:00
bba480002f refactor: restructure services and filters architecture
- Remove deprecated service interfaces (CooldownService, IgnoreService, PMService, PlayerDataService, SpyService)
- Add new unified service interfaces (MessagingService, PlayerService, PunishmentService)
- Extract FilterResult as standalone class from AdvancedMessageFilter
- Implement individual filter classes (CharacterFilter, FloodFilter, SpamFilter, SwearFilter, UrlFilter)
- Add moderation commands (BanCommand, WarnCommand, SilentWarnCommand, UnbanCommand)
- Introduce data models for punishment tracking (BanRecord, WarnEntry)
- Refactor messaging service with new MessagingServiceImpl implementation
- Add mute service utilities (MuteDataStorage, MutePermissionChecker)
- Implement PunishmentServiceImpl with snapshot tracking
- Add Discord integration components (DiscordConfig, DiscordMessageService)
- Introduce command handlers for gradient module (ColorCommandHandler, PrefixCommandHandler)
- Add renderer components (EmojiComponent, GradientBuilder, UrlProcessor)
- Add utility classes (ColorConverter, MessageSender, PlaceholderProcessor)
- Update configuration files and plugin metadata
- Add documentation files (CODE_REVIEW_RU.md, REFACTORING_SERVICES.md)
- Consolidate service architecture for improved maintainability and separation of concerns
2026-04-06 00:18:25 +02:00
2d79d2a91d chore: update .gitignore and build.gradle.kts for local server testing
- Added entries to .gitignore for local Paper test server and API documentation.
- Included the run-paper plugin in build.gradle.kts for local server execution.
- Configured runServer task with Minecraft version 1.21.4 for testing.
2026-04-01 16:09:15 +02:00
d1d2b93742 fix all 2026-03-16 12:43:52 +01:00
5088e3ad1c fix color 2026-03-13 15:51:47 +01:00
6b6605a2b0 fix 2026-03-11 14:35:00 +01:00
5ece2192a2 add fiscord webhook 2026-03-11 14:21:43 +01:00
0fea0f4537 fix 2026-03-11 11:05:47 +01:00
49744acc59 fix 2026-03-10 17:12:23 +01:00
8c9b57a3d7 add custom commands config settings 2026-03-10 16:58:51 +01:00
fe64b3d51f fix command and refactoring config 2026-03-10 16:58:10 +01:00
1e5e8d8638 feat(lohub): Add complete configuration system with 6 config files
- Added messages.yml for all plugin messages with customizable prefix
- Added commands.yml for custom commands (discord, website, store, rules, heal, clearinventory)
- Added serverselector.yml for GUI server selector menu
- Added data.yml for persistent data storage (chat_locked, spawn location)
- Updated ConfigManager to load all config files
- Updated ChatLockManager to use data.yml instead of chatlock.dat
- Updated SpawnManager to use data.yml instead of spawn.yml
- Updated all commands to use messages.yml
- Updated listeners to use messages.yml
- Removed duplicate config files from root directory
- Added CONFIG_GUIDE.md documentation
2026-02-24 13:27:18 +01:00
e78d8a2de4 Update to Minecraft 1.21.8, add checkstyle, fix compilation errors
- Update Paper API: 1.20.1 -> 1.21.4
- Update plugin version: 1.5.5-1.20.1 -> 1.5.5-1.21.8
- Add checkstyle plugin with reasonable rules
- Fix Enchantment.LUCK -> Enchantment.UNBREAKING
- Fix EntityType.FIREWORK -> EntityType.FIREWORK_ROCKET
- Remove unused imports
- Add temp_*/ to .gitignore
- 118 files changed, 1633 insertions(+), 1301 deletions(-)
2026-02-24 00:04:03 +01:00
6a4c8a7886 feat: LoHub Action system + Join system implementation 2026-02-23 17:27:34 +01:00
69cae99476 feat: Add Paper Chat API with hover/click/mentions/emojis/URLs + custom nicknames 2026-02-23 15:40:48 +01:00
7658f6f3e6 fix: Use correct placeholder format {prefix} {player} {message} instead of angle brackets 2026-02-23 14:11:30 +01:00
874835cb97 fix: Use FoliaUtil for AutoMessageManager timer (Folia compatibility) 2026-02-23 14:06:53 +01:00
0d74dbacbf fix: Add try-catch for LuckPerms initialization in GradientModule 2026-02-23 14:02:40 +01:00
542a4c8ef9 fix: Enable Folia support in plugin.yml 2026-02-23 13:32:27 +01:00
4ee5393a5e refactor: Remove all legacy managers, complete SOLID migration 2026-02-23 12:17:37 +01:00
74482851aa refactor: Remove emoji system and chat filters, implement SOLID architecture 2026-02-23 12:10:51 +01:00
16a5e09118 Fix final compilation warnings
- Removed unused imports and variables in HeadEmojiManager
- Clean compilation with no warnings
- All features working correctly
- Ready for production use
2026-01-23 22:08:46 +01:00
01d8c3a2e7 Complete config redesign and feature additions
🎨 Config Redesign:
- Unified style for all config files with beautiful headers
- Consistent color scheme using gradients throughout
- Improved readability with proper sections and comments
- Fixed color formatting issues

✨ New Features:
- SkinsRestorer integration for custom skins support
- Head emoji system (:head_nickname: and @head nickname)
- Clear chat message configuration command (/clearchatconfig)
- Enhanced custom commands with more examples
- Improved emoji system with 200+ emojis

📝 Documentation:
- Completely rewritten README.md with modern styling
- Added comprehensive feature descriptions
- Detailed command and permission tables
- Configuration examples and usage guides
- Professional formatting and structure

🔧 Technical Improvements:
- Fixed compilation errors
- Improved code organization
- Better error handling
- Enhanced compatibility

All configs now follow consistent MiniMessage gradient styling!
2026-01-23 22:06:46 +01:00
e616667c78 Fix missing features and improve code quality
Features fixed:
- Added chat filter functionality (block/warn/censor modes)
- Fixed spy command to monitor all chat messages
- Added proper spy notifications for global/local chat

Code quality improvements:
- Created PlayerUtil to eliminate code duplication in player lookup
- Refactored ChatListener into smaller, focused methods
- Added Constants class to replace magic numbers
- Improved SOLID principles compliance
- Fixed all compilation warnings

All features from README are now implemented and working.
2026-01-23 21:52:17 +01:00
4f7b792633 Adapt LoChat for Minecraft 1.20.1 Paper
- Changed dependency from Folia API 1.21.4 to Paper API 1.20.1
- Updated plugin.yml: api-version to 1.20, folia-supported to false
- Replaced Folia-specific scheduler calls with FoliaUtil for compatibility
- Updated version to 1.5.5-1.20.1
- Fixed enum switch warning in ChatListener
- Removed unused imports
- All tests pass successfully
2026-01-23 21:46:26 +01:00
3aa6291765 Fix legacy color codes (§) support in ChatFormatter
- Added conversion for § color codes to MiniMessage format
- Now supports both & and § legacy color codes
2026-01-03 12:42:23 +01:00
d00ecc88d5 Fix Folia compatibility and allow self-mute
- Use FoliaUtil.runAsync instead of scheduler.runTaskAsynchronously
- Remove self-mute restriction (can now mute yourself)
2026-01-03 12:40:05 +01:00
b74fa21272 Major mute system overhaul
Commands:
- /mute <nick> [time] [-s] [reason] - mute player
- /unmute <nick> [-s] - unmute player
- /mutelist - list active mutes
- /mutehistory <nick> - player mute history
- /muteblame <moderator> - mutes issued by moderator

Features:
- Configurable messages with placeholders (%player%, %operator%, %duration%, %reason%)
- Duration permissions: lochat.mute.dur.<time> (10m, 30m, 1h, 6h, 12h, 1d, 3d, 7d, 14d, 30d, perm)
- Silent mute: -s flag (requires lochat.mute.silent)
- See silent mutes: lochat.mute.see-silent
- Default reason configurable (default: Нету.)
- Auto-use max allowed duration if not specified
- All settings in config.yml under 'mute' section
2026-01-03 12:34:32 +01:00
d92799613e Add /lmutelist and /lmutehistory commands
- /lmutelist - shows all active mutes with remaining time
- /lmutehistory <player> - shows mute history for a player
- Added mute history tracking (mute-history.json)
- History includes: who muted, when, duration, reason, unmute info
- Permissions: lochat.mutelist, lochat.mutehistory
2026-01-03 12:29:24 +01:00
c6175d9d61 Add built-in mute system with /lmute and /lunmute commands
- Added MuteManager for handling mutes with persistence (mutes.json)
- Added /lmute <nick> <time> [-s] [reason] command
- Added /lunmute <nick> [-s] command
- Time formats: 1d, 2h, 30m, 60s, 0 for permanent
- -s flag for silent mute/unmute (no broadcast)
- Mute check integrated into ChatListener
- Removed LibertyBans API dependency (using built-in system)
2026-01-03 12:20:35 +01:00
d44c5f811f Update LibertyBans integration to compatibility mode
- Removed API dependency due to JitPack build issues
- Implemented event-based compatibility approach
- LibertyBans will handle mute enforcement directly
- Added proper plugin presence detection
- Simplified chat processing for better compatibility
- Build now succeeds without external API dependencies
2026-01-02 15:01:13 +01:00
ee626c8d8b Fix color preservation when changing prefix and add LibertyBans integration
- Fixed issue where gradient colors were lost when changing prefix
- Updated GradientGUIListener to preserve existing colors when setting prefix
- Updated GradientPrefixCommand to pass existing colors to confirmation GUI
- Added LibertyBans integration (simple version without API dependency)
- Added LibertyBans to softdepend in plugin.yml
- LibertyBans integration detects plugin presence but relies on LibertyBans own mute handling
2026-01-02 14:52:48 +01:00
ef1a6320cb Remove mute/unmute commands from plugin.yml 2026-01-01 23:48:12 +01:00
8ac304cc07 Fix &#RRGGBB color format support with lowercase normalization 2026-01-01 23:43:22 +01:00
712a8a3353 Remove TextDisplay, display name updates, mute system, and filter/censorship 2026-01-01 23:40:02 +01:00
a87a942b28 Remove unnecessary comments from all Java files 2026-01-01 23:24:24 +01:00
20c90b6ef9 Fix TextDisplayManager: Add hide/show methods for sneak functionality 2026-01-01 23:21:36 +01:00
798e52eff9 v1.5.5: Add &b&l formatting support, fix teleport issue, add display settings to config, hide TextDisplay on sneak 2026-01-01 23:14:16 +01:00
000f1962e0 Add support for legacy color formats &#RRGGBB and #RRGGBB in YAML configs 2025-12-31 14:52:42 +01:00
4494c457a4 Fix prefix showing colors when disabled + add customizable TextDisplay format with placeholders 2025-12-31 14:47:58 +01:00
8712a98a87 Fix TextDisplay height + visibility settings + fix PM placeholders showing gradient names 2025-12-31 14:37:14 +01:00
d8721138d9 Remove ChatColor system - unified all color handling in GradientModule + fix color formats 2025-12-31 14:29:49 +01:00
dbb6a61351 Add TextDisplay system for floating gradient names above players (1.19.4+) 2025-12-30 23:28:10 +01:00
64c672c02e Fix prefix display logic and add updateall admin command for display names 2025-12-30 23:20:36 +01:00
cc8f4b0f92 Fix gradient display names - convert &#RRGGBB to §x format for player names above heads 2025-12-30 23:13:54 +01:00
7b76f75e36 Fix gradient colors in chat - convert &#RRGGBB to MiniMessage <#RRGGBB> format 2025-12-30 23:00:43 +01:00