aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/rosegoldaddons/commands/Rosepet.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/rosegoldaddons/commands/Rosepet.java')
-rw-r--r--src/main/java/rosegoldaddons/commands/Rosepet.java65
1 files changed, 65 insertions, 0 deletions
diff --git a/src/main/java/rosegoldaddons/commands/Rosepet.java b/src/main/java/rosegoldaddons/commands/Rosepet.java
new file mode 100644
index 0000000..800098f
--- /dev/null
+++ b/src/main/java/rosegoldaddons/commands/Rosepet.java
@@ -0,0 +1,65 @@
+package rosegoldaddons.commands;
+
+import net.minecraft.client.Minecraft;
+import net.minecraft.command.CommandException;
+import net.minecraft.command.ICommand;
+import net.minecraft.command.ICommandSender;
+import net.minecraft.util.BlockPos;
+import org.jetbrains.annotations.NotNull;
+import rosegoldaddons.utils.ChatUtils;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class Rosepet implements ICommand {
+ public static boolean openPetS = false;
+ public static String name = "";
+
+ @Override
+ public String getCommandName() {
+ return "rosepet";
+ }
+
+ @Override
+ public String getCommandUsage(ICommandSender sender) {
+ return "/" + getCommandName();
+ }
+
+ @Override
+ public List<String> getCommandAliases() {
+ return new ArrayList<>();
+ }
+
+ @Override
+ public void processCommand(ICommandSender sender, String[] args) throws CommandException {
+ if (args.length == 0) {
+ Minecraft.getMinecraft().thePlayer.sendChatMessage("/pets");
+ openPetS = true;
+ } else {
+ Minecraft.getMinecraft().thePlayer.sendChatMessage("/pets");
+ openPetS = true;
+ name = args[0];
+
+ }
+ }
+
+ @Override
+ public boolean canCommandSenderUseCommand(ICommandSender sender) {
+ return true;
+ }
+
+ @Override
+ public List<String> addTabCompletionOptions(ICommandSender sender, String[] args, BlockPos pos) {
+ return new ArrayList<>();
+ }
+
+ @Override
+ public boolean isUsernameIndex(String[] args, int index) {
+ return false;
+ }
+
+ @Override
+ public int compareTo(@NotNull ICommand o) {
+ return 0;
+ }
+}