refactor: split god classes, fix OCP/ISP/SRP, migrate commands to BaseCommand hierarchy
This commit is contained in:
parent
793924c9ba
commit
90c3cac5cf
244 changed files with 1677 additions and 1570 deletions
|
|
@ -1,9 +1,9 @@
|
|||
package com.loki.lochat.commands;
|
||||
|
||||
import com.loki.lochat.LoChat;
|
||||
import com.loki.lochat.commands.admin.broadcast.*;
|
||||
import com.loki.lochat.commands.admin.chat.*;
|
||||
import com.loki.lochat.commands.admin.system.*;
|
||||
import com.loki.lochat.commands.admin.broadcast.*;
|
||||
import com.loki.lochat.commands.chat.*;
|
||||
import com.loki.lochat.commands.messaging.*;
|
||||
import com.loki.lochat.commands.moderation.ban.*;
|
||||
|
|
@ -11,6 +11,7 @@ import com.loki.lochat.commands.moderation.mute.*;
|
|||
import com.loki.lochat.commands.moderation.warn.*;
|
||||
import com.loki.lochat.commands.nick.*;
|
||||
import com.loki.lochat.commands.rp.*;
|
||||
|
||||
import org.bukkit.command.PluginCommand;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
|
@ -94,7 +95,9 @@ public class CommandManager {
|
|||
PluginCommand cmd = plugin.getCommand(name);
|
||||
if (cmd != null) {
|
||||
cmd.setExecutor((org.bukkit.command.CommandExecutor) executor);
|
||||
if (executor instanceof org.bukkit.command.TabCompleter tc) cmd.setTabCompleter(tc);
|
||||
if (executor instanceof org.bukkit.command.TabCompleter tc) {
|
||||
cmd.setTabCompleter(tc);
|
||||
}
|
||||
} else {
|
||||
plugin.getLogger().warning("[LoChat] Команда '" + name + "' не найдена в plugin.yml!");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue