cleanup code

This commit is contained in:
kforbro
2021-10-26 12:52:40 +03:00
parent d43bde0750
commit cd3d527119
8 changed files with 27 additions and 21 deletions
@@ -1,7 +1,10 @@
package eu.endermite.commandwhitelist.bukkit;
import eu.endermite.commandwhitelist.bukkit.command.MainCommandExecutor;
import eu.endermite.commandwhitelist.bukkit.listeners.*;
import eu.endermite.commandwhitelist.bukkit.listeners.AsyncTabCompleteBlockerListener;
import eu.endermite.commandwhitelist.bukkit.listeners.PlayerCommandPreProcessListener;
import eu.endermite.commandwhitelist.bukkit.listeners.PlayerCommandSendListener;
import eu.endermite.commandwhitelist.bukkit.listeners.TabCompleteBlockerListener;
import eu.endermite.commandwhitelist.bukkit.listeners.protocollib.PacketCommandPreProcessListener;
import eu.endermite.commandwhitelist.bukkit.listeners.protocollib.PacketCommandSendListener;
import eu.endermite.commandwhitelist.common.CWGroup;
@@ -20,7 +23,6 @@ import org.bukkit.plugin.java.JavaPlugin;
import java.io.File;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
public class CommandWhitelistBukkit extends JavaPlugin {
@@ -24,9 +24,13 @@ public class CWGroup {
return permission;
}
public HashSet<String> getCommands() { return commands; }
public HashSet<String> getCommands() {
return commands;
}
public String getCustomCommandDeniedMessage() { return custom_command_denied_message; }
public String getCustomCommandDeniedMessage() {
return custom_command_denied_message;
}
public void addCommand(String command) {
commands.add(command);
@@ -18,6 +18,7 @@ public enum CWPermission {
/**
* Allows to check specific group permission
*
* @param configCache
* @param groupId
* @return
@@ -8,7 +8,6 @@ import eu.endermite.commandwhitelist.waterfall.listeners.BungeeChatEventListener
import eu.endermite.commandwhitelist.waterfall.listeners.BungeeTabcompleteListener;
import eu.endermite.commandwhitelist.waterfall.listeners.WaterfallDefineCommandsListener;
import net.kyori.adventure.platform.bungeecord.BungeeAudiences;
import net.kyori.adventure.text.minimessage.MiniMessage;
import net.md_5.bungee.api.ChatColor;
import net.md_5.bungee.api.CommandSender;
import net.md_5.bungee.api.connection.ProxiedPlayer;
@@ -53,6 +52,7 @@ public final class CommandWhitelistWaterfall extends Plugin {
public static CommandWhitelistWaterfall getPlugin() {
return plugin;
}
public static ConfigCache getConfigCache() {
return configCache;
}
@@ -6,7 +6,6 @@ import eu.endermite.commandwhitelist.common.ConfigCache;
import eu.endermite.commandwhitelist.common.commands.CWCommand;
import eu.endermite.commandwhitelist.waterfall.CommandWhitelistWaterfall;
import net.kyori.adventure.platform.bungeecord.BungeeAudiences;
import net.kyori.adventure.text.minimessage.MiniMessage;
import net.md_5.bungee.api.connection.ProxiedPlayer;
import net.md_5.bungee.api.plugin.Listener;
import net.md_5.bungee.event.EventHandler;