diff options
author | Florian Rinke <develop@torui.de> | 2021-10-14 17:02:44 +0200 |
---|---|---|
committer | Florian Rinke <develop@torui.de> | 2021-10-14 17:02:44 +0200 |
commit | 7eacb4b62638c1ef5d5d23d7c2a8d8b0045e6bbc (patch) | |
tree | 0e6765e5b2ca1c320b1d6c55cc373c55b62e09b9 | |
parent | 30ec17ea2e0b6337787cc627fbe1efb9c45e8a8e (diff) | |
download | COFL-7eacb4b62638c1ef5d5d23d7c2a8d8b0045e6bbc.tar.gz COFL-7eacb4b62638c1ef5d5d23d7c2a8d8b0045e6bbc.tar.bz2 COFL-7eacb4b62638c1ef5d5d23d7c2a8d8b0045e6bbc.zip |
implements colf command #13
-rw-r--r-- | src/main/java/de/torui/coflsky/CoflSky.java | 2 | ||||
-rw-r--r-- | src/main/java/de/torui/coflsky/ColfCommand.java | 31 |
2 files changed, 32 insertions, 1 deletions
diff --git a/src/main/java/de/torui/coflsky/CoflSky.java b/src/main/java/de/torui/coflsky/CoflSky.java index 1ff879e..d625238 100644 --- a/src/main/java/de/torui/coflsky/CoflSky.java +++ b/src/main/java/de/torui/coflsky/CoflSky.java @@ -6,7 +6,6 @@ import java.net.URISyntaxException; import org.lwjgl.input.Keyboard; - import de.torui.coflsky.websocket.WSClientWrapper; import net.minecraft.client.settings.KeyBinding; import net.minecraftforge.client.ClientCommandHandler; @@ -50,6 +49,7 @@ public class CoflSky if(event.getSide() == Side.CLIENT) { ClientCommandHandler.instance.registerCommand(new CoflSkyCommand()); + ClientCommandHandler.instance.registerCommand(new ColfCommand()); for (int i = 0; i < keyBindings.length; ++i) { diff --git a/src/main/java/de/torui/coflsky/ColfCommand.java b/src/main/java/de/torui/coflsky/ColfCommand.java new file mode 100644 index 0000000..85091c2 --- /dev/null +++ b/src/main/java/de/torui/coflsky/ColfCommand.java @@ -0,0 +1,31 @@ +package de.torui.coflsky; + +import net.minecraft.command.CommandBase; +import net.minecraft.command.CommandException; +import net.minecraft.command.ICommandSender; + +public class ColfCommand extends CommandBase{ + + @Override + public int getRequiredPermissionLevel() { + return 0; + } + + @Override + public String getCommandName() { + // TODO Auto-generated method stub + return "colf"; + } + + @Override + public String getCommandUsage(ICommandSender sender) { + // TODO Auto-generated method stub + return "you misspelled /cofl"; + } + + @Override + public void processCommand(ICommandSender sender, String[] args) throws CommandException { + throw new CommandException("you misspelled /cofl"); + } + +} |