refactor: Remove emoji system and chat filters, implement SOLID architecture

This commit is contained in:
loki5512344 2026-02-23 12:10:51 +01:00
parent 16a5e09118
commit 74482851aa
72 changed files with 2654 additions and 1287 deletions

View file

@ -1,6 +1,7 @@
package com.loki.lochat.commands;
import com.loki.lochat.LoChat;
import com.loki.lochat.api.service.ChatService;
import com.loki.lochat.utils.ChatFormatter;
import net.kyori.adventure.text.Component;
import net.kyori.adventure.text.minimessage.MiniMessage;
@ -10,13 +11,19 @@ import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.jetbrains.annotations.NotNull;
/**
* Команда для локального чата
* /l <сообщение> - отправить сообщение в локальный чат
*/
public class LocalChatCommand implements CommandExecutor {
private final LoChat plugin;
private final ChatService chatService;
private static final MiniMessage MM = MiniMessage.miniMessage();
public LocalChatCommand(LoChat plugin) {
this.plugin = plugin;
this.chatService = plugin.getServiceRegistry().get(ChatService.class);
}
@Override
@ -33,10 +40,10 @@ public class LocalChatCommand implements CommandExecutor {
String message = String.join(" ", args);
// Конвертируем String в Component для новой сигнатуры ChatManager
// Конвертируем String в Component для новой сигнатуры ChatService
Component messageComponent = MM.deserialize(message);
plugin.getChatManager().sendLocalMessage(player, messageComponent);
chatService.sendLocalMessage(player, messageComponent);
return true;
}
}
}