260986ff11
feat: hover translation (Google, Chrome endpoint with gtx fallback), LuckPerms prefixes in chat, restyled messages
Build & Test / Build LoChat (push) Waiting to run
2026-09-20 21:05:17 +02:00
bd39118b14
chore: add PMD 7.8.0 and fix warnings/antipatterns
...
- build.gradle.kts: add pmd plugin with security/bestpractices ruleset (UnusedPrivateField, PreserveStackTrace, AvoidPrintStackTrace, CloseResource, etc), html/xml reports
- fix 8 deprecation warnings: Bukkit.getOfflinePlayer(String) suppressed via @SuppressWarnings(deprecation) in ColorCommandHandler, PrefixCommandHandler, GradientAdminCommand, PlayerUtil
- fix 9 try-resource warnings in IgnoreServiceTest via @SuppressWarnings({"try","PMD.UnusedLocalVariable"})
- PMD fixes: AvoidPrintStackTrace -> logger.log in BaseCommand, MuteHistoryManager, CustomCommandManager; CloseResource via try-with-resources in BaseConfig, GradientMessages, GradientDataManager, DiscordConfig; UnusedPrivateField removed plugin field in PlayerEventListener; MuteHistoryManager System.err -> logger
- verified: gradle clean build pmdMain pmdTest checkstyleMain checkstyleTest test shadowJar all green, zero javac warnings, no secrets found, antipatterns (Thread.sleep in async webhook/rate-limiter kept isolated, printStackTrace removed)
2026-09-20 16:56:02 +02:00
83e980d1bb
trim: moderation → mute only
...
- remove ban/warn commands: BanCommand (/lban), UnbanCommand (/lunban),
WarnCommand (/warn), SilentWarnCommand (silentwarn) and empty ban/warn dirs
- plugin.yml: remove commands lban/lunban/warn/silentwarn and
permissions lochat.ban/lochat.unban/lochat.warn/lochat.warn.silent/
lochat.warn.notify/lochat.bypass.warn/lochat.bypass.ban/lochat.ban.override;
remove LibertyBans from softdepend
- remove registration in CommandManager and PluginInitializer
(LibertyBansHook, ModerationListener)
- delete PunishmentService api+impl, BanRecord/WarnEntry models,
ModerationListener, LibertyBansHook; strip ServiceRegistry/PluginInitializer/
LoChat reload and PlayerInfoCommand (warn/ban sections)
- config: remove moderation.default-ban-reason/ban-kick-message from
config.yml, ban/warn keys from config/messages.yml, escalation header
Punishment->Mute in mute.yml
- MessagesConfig.java: remove ban/warn getters (keep mute)
- README: remove /lban /warn rows, update features to mute-only
- preserve /lmute /lunmute /lmutelist /lmuteblame, MuteService, mute.yml,
mutes.json format and HIGHEST chat handler
2026-09-20 16:44:39 +02:00
7f513a7104
port: replace Paper component APIs, chat pipeline, events and schedulers
...
- Msg.send/broadcast/actionBar/title/legacy/plain for all 58 files sendMessage replacements (plan step 3)
- ChatEventListener: AsyncChatEvent->AsyncPlayerChatEvent, getRecipients filtering, manual render+Msg.send loop, HIGHEST|ignoreCancelled, nobodyHeard via Bukkit scheduler (step 4)
- EnhancedChatRenderer: remove ChatRenderer/Audience, render(Player,Component,Component,Player), getLocale String, Msg.actionBar
- PlayerEventListener: join/quit/death String API, getCustomName/getDisplayName legacy, Msg.broadcast
- FoliaUtil: IS_FOLIA false, Bukkit scheduler only; AutoMessageManager BukkitTask
- CustomCommandManager: reflective getCommandMap; other mechanical fixes (displayName, kick, inventory titles)
- single universal jar (variant A) - loads on Spigot 1.20.1 and Paper
2026-09-20 16:38:37 +02:00
88e4e68cca
port: compat layer
...
- add compat/Adventure (BukkitAudiences lifecycle with legacy fallback)
- add compat/Msg (send/broadcast/actionBar/title/legacy/plain/displayName/playerListName/kick/itemMeta/inventoryTitle)
- wire Adventure.init/close in LoChat onEnable/onDisable
- remove unused reflection-based utils/platform/AdventureManager
2026-09-20 16:18:40 +02:00
dd725ad255
port: build for spigot 1.20.1 (universal jar)
...
- replace paper-api with spigot-api 1.20.1, add spigot snapshots repo
- bundle Adventure 4.17.0 + platform-bukkit 4.3.4 via shadowJar with relocate to com.loki.lochat.libs.kyori/gson and mergeServiceFiles
- version 1.5.5-1.20.1, api-version 1.20, remove folia-supported, run-paper
- single universal jar loads on Spigot/Mohist 1.20.1 and Paper 1.20.x-1.21.x (Paper is superset)
- CI: add spigot-1.20.1 branch
2026-09-20 16:18:00 +02:00
a822c91637
feat: chat channel system (/join /leave /channel)
...
- config-driven channels in config/channels.yml (global, local, staff, trade) with
emoji, colors, prefix, radius, cooldowns, permissions and aliases
- Channel record + ChannelConfig loader wired into ConfigManager (reload supported)
- ChannelService (api) + ConcurrentHashMap-backed ChannelServiceImpl, joined in
ServiceRegistry; default channel join treated as 'not in channel'
- JoinChannelCommand / LeaveChannelCommand / ChannelCommand (+ tab completion),
registered in CommandManager; plugin.yml commands + permissions
- ChatEventListener routes AsyncChatEvent to the active channel: per-channel
cooldown, local-radius viewer filtering, channel-aware renderer
- EnhancedChatRenderer supports Channel overload (emojiFor/prefixText/channelColor)
- ChannelServiceImplTest covering join/leave/permissions/aliases
2026-08-09 21:31:11 +02:00
689ab1a9ae
feat: anti-swear obfuscation bypass + filter statistics
...
- SwearNormalizer: expanded leet/lookalike map (q→р, digits), strips separators inside
words, collapses repeated letters; single source of truth for AhoCorasick
- SwearFilter: detects obfuscated profanity on normalized text, masks tolerant matches
in replace mode via tolerant word patterns
- FilterStatistics: per-filter block counters -> /lochat filterstats subcommand
- tests: SwearNormalizerTest, FilterStatisticsTest
2026-08-09 21:17:18 +02:00
cda89c78e4
fix: carry-over fixes — per-type cooldowns, PM cooldown, nickname persistence, thread-safe deques
...
- PlayerServiceImpl: separate cooldown map per chat type (fixes cross-blocking between local chat and RP commands)
- PrivateMessageServiceImpl: enforce chat.pm.cooldown (honors chat.bypass.cooldown)
- NickServiceImpl: persist nicknames async on every change/reset
- FloodFilter/SpamFilter: ConcurrentLinkedDeque instead of ArrayDeque
- tests: PlayerServiceCooldownTest
2026-08-09 21:08:58 +02:00
b1b0c9082b
fix: critical fixes from code review — async translation, atomic persistence, unified chat pipeline, config key alignment
2026-08-09 21:04:07 +02:00
103c982f87
chore: unify checkstyle, fix violations, cleanup bin/
2026-07-12 00:59:08 +02:00
6af62d3bf6
docs: unify README style with flat-square badges and bilingual layout
2026-07-12 00:32:30 +02:00
25cd6c3e88
feat: add chat message translation via LibreTranslate
...
Adds optional translation feature that shows translated chat messages
on hover in each viewer's Minecraft client language.
- TranslationService with LibreTranslate API support and caching
- Config options: enabled, endpoint, api-key
- Hover translation on chat messages in EnhancedChatRenderer
- Disabled by default, supports any LibreTranslate-compatible endpoint
2026-07-06 00:01:59 +02:00
4737d52cdd
test: add IgnoreService and SpyService unit tests
2026-07-05 16:19:31 +02:00
09689ae799
refactor: DIP — core services & listeners use constructor injection, ServiceRegistry removed
2026-07-05 16:16:18 +02:00
a66d2b54d5
test: add CapsFilter, CharacterFilter, SpamFilter unit tests
2026-07-05 16:11:04 +02:00
5eae09e5bb
perf: replace regex swear filter with Aho-Corasick O(n) trie + add FilterResult unit tests
2026-07-05 16:08:32 +02:00
42ebac890c
feat: persistence util, PM DRY, Discord rate limiter, missing permissions in plugin.yml
2026-07-05 15:17:15 +02:00
dd0fb0f10d
fix: zero checkstyle warnings, exclude test sources, fix LineLength
2026-07-05 13:51:48 +02:00
4efccd3968
fix: encapsulation, star imports, checkstyle warnings (520→41), remove casts
2026-07-05 13:38:47 +02:00
90c3cac5cf
refactor: split god classes, fix OCP/ISP/SRP, migrate commands to BaseCommand hierarchy
2026-07-05 13:22:48 +02:00
793924c9ba
ci: add checkstyle reporting, caching, checksums to workflows
2026-07-05 11:39:37 +02:00
d3d87c34e0
chore: cleanup configs, docs, checkstyle, remove dead deps
2026-07-05 11:38:24 +02:00
984b364295
fix(ci): обновить actions до Node24, исправить generate_release_notes
2026-06-11 00:02:13 +02:00
3aa555db26
fix(ci): добавить permissions contents:write для release workflow
2026-06-10 23:55:58 +02:00
b811c3d84b
fix(ci): исправить права gradlew (+x) и обновить workflows
2026-06-10 23:52:46 +02:00
0e7f03dba1
ci: добавить GitHub Actions (build + release)
2026-06-10 23:42:23 +02:00
f06166dc5e
chore: удалить Forgejo Actions (больше не используется)
2026-06-10 23:32:48 +02:00
80cf392c1f
docs: добавить Code of Conduct, Security Policy и Issue Templates
...
Добавлены:
- CODE_OF_CONDUCT.md - правила поведения в сообществе
- SECURITY.md - политика безопасности и отчетность об уязвимостях
- .github/ISSUE_TEMPLATE/bug_report.md - шаблон для багов
- .github/ISSUE_TEMPLATE/feature_request.md - шаблон для новых функций
- .github/ISSUE_TEMPLATE/question.md - шаблон для вопросов
- .github/PULL_REQUEST_TEMPLATE.md - шаблон для PR
Обновлен README.md:
- Обновлена версия Paper до 1.21.1
- Улучшен раздел "Вклад в проект"
- Уточнены известные проблемы
2026-04-12 23:00:20 +02:00
812517513f
build: rebuild artifacts and update CI workflows
2026-04-07 13:45:25 +02:00
eb85778b8e
Fix CI: use codeberg-small runner instead of ubuntu-latest
2026-04-07 13:36:06 +02:00
e7b10a7daa
refactor(core): обновить ServiceFactory и ServiceRegistry
...
Добавлен фабричный метод для MessagingService:
- ServiceFactory.createMessagingService() - создание MessagingService
- ServiceRegistry теперь использует фабрику для MessagingService
Изменения:
~ core/factory/ServiceFactory.java
+ createMessagingService(plugin, messageConfig)
~ core/registry/ServiceRegistry.java
- new MessagingServiceImpl(plugin, messageConfig)
+ ServiceFactory.createMessagingService(plugin, messageConfig)
Результат:
- Единообразное создание сервисов через фабрику
- Упрощена инициализация в ServiceRegistry
- Улучшена тестируемость
2026-04-07 13:23:10 +02:00
3e5dcbf3ac
ci: добавить Forgejo Actions workflows
...
Добавлены 3 workflow для CI/CD:
1. build.yml - основная сборка и тесты
- Запускается на push в main/develop и PR
- Сборка с Gradle
- Запуск тестов
- Загрузка артефактов (jar файлы, отчеты тестов)
2. release.yml - автоматические релизы
- Запускается при создании тега v*
- Сборка без тестов
- Создание релиза с артефактами
3. quality.yml - проверка качества кода
- Проверка стиля кода
- Тесты с покрытием (Jacoco)
- Загрузка отчетов о покрытии
Требования:
- JDK 21 (Temurin)
- Gradle wrapper
- Forgejo Actions runner
2026-04-07 13:21:34 +02:00
4107731014
refactor(gradient): разбить GradientPrefixCommand через Command pattern (212→64 строки)
...
Применен Command pattern с handlers:
- PrefixSubCommandHandler: интерфейс для обработчиков
- PrefixOnHandler: включение префикса (40 строк)
- PrefixOffHandler: выключение префикса (35 строк)
- PrefixResetHandler: сброс префикса (40 строк)
- PrefixSetHandler: установка префикса (110 строк)
Структура:
+ gradient/commands/handlers/prefix/PrefixSubCommandHandler.java
+ gradient/commands/handlers/prefix/PrefixOnHandler.java
+ gradient/commands/handlers/prefix/PrefixOffHandler.java
+ gradient/commands/handlers/prefix/PrefixResetHandler.java
+ gradient/commands/handlers/prefix/PrefixSetHandler.java
~ gradient/commands/GradientPrefixCommand.java (212→64 строки)
Результат:
- GradientPrefixCommand уменьшен с 212 до 64 строк
- Каждый handler отвечает за одну подкоманду
- Улучшена тестируемость и расширяемость
- Все god-классы разбиты, директории оптимизированы
2026-04-07 12:57:06 +02:00
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
c46994d192
docs: update README with full documentation
2026-03-10 17:07:39 +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