feat: Add Paper Chat API with hover/click/mentions/emojis/URLs + custom nicknames
This commit is contained in:
parent
7658f6f3e6
commit
69cae99476
21 changed files with 670 additions and 229 deletions
|
|
@ -2,6 +2,7 @@ package com.loki.lochat;
|
|||
|
||||
import com.loki.lochat.api.service.IgnoreService;
|
||||
import com.loki.lochat.api.service.MuteService;
|
||||
import com.loki.lochat.api.service.NickService;
|
||||
import com.loki.lochat.commands.*;
|
||||
import com.loki.lochat.config.ConfigManager;
|
||||
import com.loki.lochat.config.MessageConfig;
|
||||
|
|
@ -33,7 +34,7 @@ public final class LoChat extends JavaPlugin {
|
|||
@Override
|
||||
public void onEnable() {
|
||||
instance = this;
|
||||
getLogger().info("Загрузка LoChat v" + getDescription().getVersion() + " для Paper/Folia " + Bukkit.getMinecraftVersion() + "...");
|
||||
getLogger().info("Загрузка LoChat v" + getPluginMeta().getVersion() + " для Paper/Folia " + Bukkit.getMinecraftVersion() + "...");
|
||||
|
||||
// Конфиги
|
||||
configManager = new ConfigManager(this);
|
||||
|
|
@ -71,6 +72,9 @@ public final class LoChat extends JavaPlugin {
|
|||
MuteService muteService = serviceRegistry.get(MuteService.class);
|
||||
if (muteService != null) muteService.save();
|
||||
|
||||
NickService nickService = serviceRegistry.get(NickService.class);
|
||||
if (nickService != null) nickService.save();
|
||||
|
||||
if (gradientModule != null) gradientModule.shutdown();
|
||||
getLogger().info("LoChat отключен!");
|
||||
}
|
||||
|
|
@ -103,6 +107,10 @@ public final class LoChat extends JavaPlugin {
|
|||
getCommand("chatspy").setExecutor(new ChatSpyCommand(this));
|
||||
getCommand("clearchat").setExecutor(new ClearChatCommand(this));
|
||||
|
||||
NickCommand nickCmd = new NickCommand(this);
|
||||
getCommand("nick").setExecutor(nickCmd);
|
||||
getCommand("nick").setTabCompleter(nickCmd);
|
||||
|
||||
LoChatCommand loChatCmd = new LoChatCommand(this);
|
||||
getCommand("lochat").setExecutor(loChatCmd);
|
||||
getCommand("lochat").setTabCompleter(loChatCmd);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue