From 00380c1826622ddb6b3506817e5a90b591df50f7 Mon Sep 17 00:00:00 2001 From: Auxilor Date: Tue, 16 Feb 2021 15:11:43 +0000 Subject: [PATCH] Removed redundant /taldebug command --- .../com/willfp/talismans/TalismansPlugin.java | 2 - .../talismans/commands/CommandTaldebug.java | 76 ------------------- .../core-plugin/src/main/resources/plugin.yml | 7 -- 3 files changed, 85 deletions(-) delete mode 100644 eco-core/core-plugin/src/main/java/com/willfp/talismans/commands/CommandTaldebug.java diff --git a/eco-core/core-plugin/src/main/java/com/willfp/talismans/TalismansPlugin.java b/eco-core/core-plugin/src/main/java/com/willfp/talismans/TalismansPlugin.java index 3d3b692..ea9d66f 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/talismans/TalismansPlugin.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/talismans/TalismansPlugin.java @@ -7,7 +7,6 @@ import com.willfp.eco.util.integrations.IntegrationLoader; import com.willfp.eco.util.interfaces.EcoRunnable; import com.willfp.eco.util.plugin.AbstractEcoPlugin; import com.willfp.eco.util.protocollib.AbstractPacketAdapter; -import com.willfp.talismans.commands.CommandTaldebug; import com.willfp.talismans.commands.CommandTalgive; import com.willfp.talismans.commands.CommandTalreload; import com.willfp.talismans.commands.TabcompleterTalgive; @@ -128,7 +127,6 @@ public class TalismansPlugin extends AbstractEcoPlugin { @Override public List getCommands() { return Arrays.asList( - new CommandTaldebug(this), new CommandTalreload(this), new CommandTalgive(this) ); diff --git a/eco-core/core-plugin/src/main/java/com/willfp/talismans/commands/CommandTaldebug.java b/eco-core/core-plugin/src/main/java/com/willfp/talismans/commands/CommandTaldebug.java deleted file mode 100644 index 5ec7490..0000000 --- a/eco-core/core-plugin/src/main/java/com/willfp/talismans/commands/CommandTaldebug.java +++ /dev/null @@ -1,76 +0,0 @@ -package com.willfp.talismans.commands; - -import com.comphenix.protocol.ProtocolLibrary; -import com.comphenix.protocol.events.ListenerPriority; -import com.willfp.eco.util.command.AbstractCommand; -import com.willfp.eco.util.drops.internal.DropManager; -import com.willfp.eco.util.plugin.AbstractEcoPlugin; -import com.willfp.eco.util.proxy.ProxyConstants; -import com.willfp.talismans.talismans.Talismans; -import org.bukkit.Bukkit; -import org.bukkit.command.CommandSender; -import org.bukkit.entity.Player; -import org.bukkit.plugin.Plugin; -import org.jetbrains.annotations.NotNull; - -import java.util.Arrays; -import java.util.List; -import java.util.stream.Collectors; - -@SuppressWarnings("unchecked") -public class CommandTaldebug extends AbstractCommand { - /** - * Instantiate a new /taldebug command handler. - * - * @param plugin The plugin for the commands to listen for. - */ - public CommandTaldebug(@NotNull final AbstractEcoPlugin plugin) { - super(plugin, "taldebug", "talismans.taldebug", false); - } - - @Override - public void onExecute(@NotNull final CommandSender sender, - @NotNull final List args) { - this.getPlugin().getLog().info("--------------- BEGIN DEBUG ----------------"); - if (sender instanceof Player) { - Player player = (Player) sender; - player.sendMessage("Held Item: " + player.getInventory().getItemInMainHand().toString()); - this.getPlugin().getLog().info(""); - - this.getPlugin().getLog().info("Held Item: " + player.getInventory().getItemInMainHand().toString()); - this.getPlugin().getLog().info(""); - } - - this.getPlugin().getLog().info("Running Version: " + this.getPlugin().getDescription().getVersion()); - this.getPlugin().getLog().info(""); - - this.getPlugin().getLog().info("Loaded Extensions: " + this.getPlugin().getExtensionLoader().getLoadedExtensions().stream() - .map(extension -> extension.getName() + " v" + extension.getVersion()) - .collect(Collectors.joining())); - this.getPlugin().getLog().info(""); - - this.getPlugin().getLog().info("Talismans.values(): " + Talismans.values().toString()); - this.getPlugin().getLog().info(""); - - this.getPlugin().getLog().info("Installed Plugins: " + Arrays.stream(Bukkit.getPluginManager().getPlugins()).map(Plugin::getName).collect(Collectors.toList()).toString()); - this.getPlugin().getLog().info(""); - - this.getPlugin().getLog().info("Drop Type: " + DropManager.getType()); - this.getPlugin().getLog().info(""); - - this.getPlugin().getLog().info("Packets: " + ProtocolLibrary.getProtocolManager().getPacketListeners().stream() - .filter(packetListener -> packetListener.getSendingWhitelist().getPriority().equals(ListenerPriority.MONITOR)) - .collect(Collectors.toList()).toString()); - this.getPlugin().getLog().info(""); - - this.getPlugin().getLog().info("Server Information: "); - this.getPlugin().getLog().info("Players Online: " + Bukkit.getServer().getOnlinePlayers().size()); - this.getPlugin().getLog().info("Bukkit IP: " + Bukkit.getIp()); - this.getPlugin().getLog().info("Running Version: " + Bukkit.getVersion() - + ", Bukkit Version: " + Bukkit.getBukkitVersion() - + ", Alt Version: " + Bukkit.getServer().getVersion() - + ", NMS: " + ProxyConstants.NMS_VERSION); - this.getPlugin().getLog().info("Motd: " + Bukkit.getServer().getMotd()); - this.getPlugin().getLog().info("--------------- END DEBUG ----------------"); - } -} diff --git a/eco-core/core-plugin/src/main/resources/plugin.yml b/eco-core/core-plugin/src/main/resources/plugin.yml index 59adfa6..7965418 100644 --- a/eco-core/core-plugin/src/main/resources/plugin.yml +++ b/eco-core/core-plugin/src/main/resources/plugin.yml @@ -26,9 +26,6 @@ commands: talreload: description: Reloads config permission: talismans.reload - taldebug: - description: Debug information - permission: talismans.taldebug talgive: description: Give a player a talisman permission: talismans.give @@ -39,16 +36,12 @@ permissions: default: op children: talismans.reload: true - talismans.taldebug: true talismans.give: true talismans.fromtable.*: true talismans.reload: description: Allows reloading the config default: op - talismans.taldebug: - description: Allows the use of /taldebug to print verbose debug information to console - default: op talismans.give: description: Allows the use of /talgive. default: op