Removed redundant /taldebug command

This commit is contained in:
Auxilor
2021-02-16 15:11:43 +00:00
parent ca4d140a14
commit 00380c1826
3 changed files with 0 additions and 85 deletions

View File

@@ -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<AbstractCommand> getCommands() {
return Arrays.asList(
new CommandTaldebug(this),
new CommandTalreload(this),
new CommandTalgive(this)
);

View File

@@ -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<String> 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 ----------------");
}
}

View File

@@ -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