From a2eff4ba190fec49fc677514922e1b42b6ad4d51 Mon Sep 17 00:00:00 2001 From: Bella Date: Sun, 8 Mar 2020 13:19:16 -0400 Subject: [PATCH] revert ccc6db61ef2f411afd2936c81656fdc9a62aadfe --- .../me/zeroeightsix/kami/command/Command.java | 17 +---------------- .../kami/command/CommandManager.java | 12 +----------- .../kami/command/commands/CommandsCommand.java | 2 +- .../kami/command/commands/ConfigCommand.java | 2 +- .../kami/command/commands/CreditsCommand.java | 2 +- .../command/commands/EntityStatsCommand.java | 2 +- .../kami/command/commands/FriendCommand.java | 2 +- .../kami/command/commands/HelpCommand.java | 2 +- .../kami/command/commands/PathCommand.java | 2 +- .../kami/command/commands/SignBookCommand.java | 2 +- .../kami/command/commands/TeleportCommand.java | 2 +- .../kami/command/commands/ToggleCommand.java | 2 +- .../kami/command/commands/VanishCommand.java | 2 +- 13 files changed, 13 insertions(+), 38 deletions(-) diff --git a/src/main/java/me/zeroeightsix/kami/command/Command.java b/src/main/java/me/zeroeightsix/kami/command/Command.java index 4d06564a..2af3fd06 100644 --- a/src/main/java/me/zeroeightsix/kami/command/Command.java +++ b/src/main/java/me/zeroeightsix/kami/command/Command.java @@ -10,8 +10,6 @@ import net.minecraft.launchwrapper.LogWrapper; import net.minecraft.util.text.ITextComponent; import net.minecraft.util.text.TextComponentBase; -import java.util.ArrayList; -import java.util.Arrays; import java.util.regex.Matcher; import java.util.regex.Pattern; @@ -20,7 +18,6 @@ public abstract class Command { protected String label; protected String syntax; protected String description; - protected ArrayList aliases; public final Minecraft mc = Minecraft.getMinecraft(); @@ -28,18 +25,10 @@ public abstract class Command { public static Setting commandPrefix = Settings.s("commandPrefix", "."); - public Command(String label, SyntaxChunk[] syntaxChunks, ArrayList aliases) { + public Command(String label, SyntaxChunk[] syntaxChunks) { this.label = label; this.syntaxChunks = syntaxChunks; this.description = "Descriptionless"; - this.aliases = aliases; - } - - public Command(String label, SyntaxChunk[] syntaxChunks, String... aliases) { - this.label = label; - this.syntaxChunks = syntaxChunks; - this.description = "Descriptionless"; - this.aliases = new ArrayList(Arrays.asList(aliases)); } public static void sendChatMessage(String message) { @@ -95,10 +84,6 @@ public abstract class Command { return label; } - public ArrayList getAliases() { - return aliases; - } - public abstract void call(String[] args); public SyntaxChunk[] getSyntaxChunks() { diff --git a/src/main/java/me/zeroeightsix/kami/command/CommandManager.java b/src/main/java/me/zeroeightsix/kami/command/CommandManager.java index ae18acd9..99f8557a 100644 --- a/src/main/java/me/zeroeightsix/kami/command/CommandManager.java +++ b/src/main/java/me/zeroeightsix/kami/command/CommandManager.java @@ -44,22 +44,12 @@ public class CommandManager { for (Command c : commands) { if (c.getLabel().equalsIgnoreCase(label)) { - if (!c.getAliases().isEmpty()) { - Command.sendChatMessage("This command has aliases!"); - Command.sendChatMessage(c.getLabel() + ", " + String.join(", ", c.getAliases())); - } c.call(parts); return; } - else for (int i = 0; i < c.getAliases().size(); i++) { - if (c.getAliases().get(i).equalsIgnoreCase(label)) { - c.call(parts); - return; - } - } } - Command.sendChatMessage("Unknown command. try 'cmds' for a list of commands."); + Command.sendChatMessage("Unknown command. try 'commands' for a list of commands."); } public static String[] removeElement(String[] input, int indexToDelete) { diff --git a/src/main/java/me/zeroeightsix/kami/command/commands/CommandsCommand.java b/src/main/java/me/zeroeightsix/kami/command/commands/CommandsCommand.java index 5b014ff6..6ab19393 100644 --- a/src/main/java/me/zeroeightsix/kami/command/commands/CommandsCommand.java +++ b/src/main/java/me/zeroeightsix/kami/command/commands/CommandsCommand.java @@ -12,7 +12,7 @@ import java.util.Comparator; public class CommandsCommand extends Command { public CommandsCommand() { - super("commands", SyntaxChunk.EMPTY, "cmd", "cmds"); + super("commands", SyntaxChunk.EMPTY); setDescription("Gives you this list of commands"); } diff --git a/src/main/java/me/zeroeightsix/kami/command/commands/ConfigCommand.java b/src/main/java/me/zeroeightsix/kami/command/commands/ConfigCommand.java index 33d7bcbd..75317367 100644 --- a/src/main/java/me/zeroeightsix/kami/command/commands/ConfigCommand.java +++ b/src/main/java/me/zeroeightsix/kami/command/commands/ConfigCommand.java @@ -22,7 +22,7 @@ public class ConfigCommand extends Command { super("config", new ChunkBuilder() .append("mode", true, new EnumParser(new String[]{"reload", "save", "path"})) .append("path", true, new DependantParser(0, new DependantParser.Dependency(new String[][]{{"path", "path"}}, ""))) - .build(), "cfg"); + .build()); setDescription("Change where your config is saved or manually save and reload your config"); } diff --git a/src/main/java/me/zeroeightsix/kami/command/commands/CreditsCommand.java b/src/main/java/me/zeroeightsix/kami/command/commands/CreditsCommand.java index c8361852..61a728ff 100644 --- a/src/main/java/me/zeroeightsix/kami/command/commands/CreditsCommand.java +++ b/src/main/java/me/zeroeightsix/kami/command/commands/CreditsCommand.java @@ -8,7 +8,7 @@ import me.zeroeightsix.kami.command.Command; public class CreditsCommand extends Command { public CreditsCommand() { - super("credits", null, "creds"); + super("credits", null); setDescription("Prints KAMI Blue's authors and contributors"); } diff --git a/src/main/java/me/zeroeightsix/kami/command/commands/EntityStatsCommand.java b/src/main/java/me/zeroeightsix/kami/command/commands/EntityStatsCommand.java index 370df5fe..dc439d36 100644 --- a/src/main/java/me/zeroeightsix/kami/command/commands/EntityStatsCommand.java +++ b/src/main/java/me/zeroeightsix/kami/command/commands/EntityStatsCommand.java @@ -15,7 +15,7 @@ import java.math.RoundingMode; public class EntityStatsCommand extends Command { public EntityStatsCommand() { - super("entitystats", null, "estats", "horestats", "hstats", "vehiclestats"); + super("entitystats", null); setDescription("Print the statistics of the entity you're currently riding"); } diff --git a/src/main/java/me/zeroeightsix/kami/command/commands/FriendCommand.java b/src/main/java/me/zeroeightsix/kami/command/commands/FriendCommand.java index 6fb914db..498ababc 100644 --- a/src/main/java/me/zeroeightsix/kami/command/commands/FriendCommand.java +++ b/src/main/java/me/zeroeightsix/kami/command/commands/FriendCommand.java @@ -26,7 +26,7 @@ public class FriendCommand extends Command { super("friend", new ChunkBuilder() .append("mode", true, new EnumParser(new String[]{"add", "del"})) .append("name") - .build(), "friends", "f"); + .build()); setDescription("Add someone as your friend!"); } diff --git a/src/main/java/me/zeroeightsix/kami/command/commands/HelpCommand.java b/src/main/java/me/zeroeightsix/kami/command/commands/HelpCommand.java index ffe6f476..73174c84 100644 --- a/src/main/java/me/zeroeightsix/kami/command/commands/HelpCommand.java +++ b/src/main/java/me/zeroeightsix/kami/command/commands/HelpCommand.java @@ -34,7 +34,7 @@ public class HelpCommand extends Command { } public HelpCommand() { - super("help", new SyntaxChunk[]{}, "?"); + super("help", new SyntaxChunk[]{}); setDescription("Delivers help on certain subjects. Use &7" + Command.getCommandPrefix() + "help subjects&8 for a list."); } diff --git a/src/main/java/me/zeroeightsix/kami/command/commands/PathCommand.java b/src/main/java/me/zeroeightsix/kami/command/commands/PathCommand.java index 2928127e..93a791d9 100644 --- a/src/main/java/me/zeroeightsix/kami/command/commands/PathCommand.java +++ b/src/main/java/me/zeroeightsix/kami/command/commands/PathCommand.java @@ -10,7 +10,7 @@ import net.minecraft.pathfinding.PathPoint; */ public class PathCommand extends Command { public PathCommand() { - super("path", new ChunkBuilder().append("x").append("y").append("z").build(), "pathfind"); + super("path", new ChunkBuilder().append("x").append("y").append("z").build()); setDescription("Pathfinding for AutoWalk"); } diff --git a/src/main/java/me/zeroeightsix/kami/command/commands/SignBookCommand.java b/src/main/java/me/zeroeightsix/kami/command/commands/SignBookCommand.java index bdfcd60b..0b51c1c3 100644 --- a/src/main/java/me/zeroeightsix/kami/command/commands/SignBookCommand.java +++ b/src/main/java/me/zeroeightsix/kami/command/commands/SignBookCommand.java @@ -20,7 +20,7 @@ import java.util.ArrayList; public class SignBookCommand extends Command { public SignBookCommand() { - super("signbook", new ChunkBuilder().append("name").build(), "book", "sign"); + super("signbook", new ChunkBuilder().append("name").build()); setDescription("Colored book names. &7#n&8 for a new line and &7&&8 for colour codes"); } diff --git a/src/main/java/me/zeroeightsix/kami/command/commands/TeleportCommand.java b/src/main/java/me/zeroeightsix/kami/command/commands/TeleportCommand.java index 02b10298..2cbda937 100644 --- a/src/main/java/me/zeroeightsix/kami/command/commands/TeleportCommand.java +++ b/src/main/java/me/zeroeightsix/kami/command/commands/TeleportCommand.java @@ -26,7 +26,7 @@ public class TeleportCommand extends Command { .append("y", true) .append("z", true) .append("blocks per tp", false) - .build(), "tp", "hclip", "clip"); + .build()); setDescription("Potentia teleport exploit"); } diff --git a/src/main/java/me/zeroeightsix/kami/command/commands/ToggleCommand.java b/src/main/java/me/zeroeightsix/kami/command/commands/ToggleCommand.java index f28d97b5..ac9c531e 100644 --- a/src/main/java/me/zeroeightsix/kami/command/commands/ToggleCommand.java +++ b/src/main/java/me/zeroeightsix/kami/command/commands/ToggleCommand.java @@ -14,7 +14,7 @@ public class ToggleCommand extends Command { public ToggleCommand() { super("toggle", new ChunkBuilder() .append("module", true, new ModuleParser()) - .build(), "t"); + .build()); setDescription("Quickly toggle a module on and off"); } diff --git a/src/main/java/me/zeroeightsix/kami/command/commands/VanishCommand.java b/src/main/java/me/zeroeightsix/kami/command/commands/VanishCommand.java index 50167861..6c2b85c9 100644 --- a/src/main/java/me/zeroeightsix/kami/command/commands/VanishCommand.java +++ b/src/main/java/me/zeroeightsix/kami/command/commands/VanishCommand.java @@ -14,7 +14,7 @@ public class VanishCommand extends Command { Minecraft mc = Minecraft.getMinecraft(); public VanishCommand() { - super("vanish", null, "entitydesync", "edesync", "entityvanish", "evanish", "ev", "van"); + super("vanish", null); setDescription("Allows you to vanish using an entity"); }