diff options
author | Sychic <Sychic@github.com> | 2020-12-23 12:07:30 -0500 |
---|---|---|
committer | Sychic <Sychic@github.com> | 2020-12-23 12:07:30 -0500 |
commit | 174b46ccbb36aaa75d46c65c6f6dc38ee0998ba4 (patch) | |
tree | 86ac1eb3bc2ad1bf5b7ab400ca104cb6503e646f /src/main/java/me/Danker/commands | |
parent | 7777fe8a544a347013c4790e16b061eca5b5e0de (diff) | |
download | SkyblockMod-174b46ccbb36aaa75d46c65c6f6dc38ee0998ba4.tar.gz SkyblockMod-174b46ccbb36aaa75d46c65c6f6dc38ee0998ba4.tar.bz2 SkyblockMod-174b46ccbb36aaa75d46c65c6f6dc38ee0998ba4.zip |
Revert "Add Repartying"
This reverts commit c64eea23
Diffstat (limited to 'src/main/java/me/Danker/commands')
-rw-r--r-- | src/main/java/me/Danker/commands/RepartyCommand.java | 60 | ||||
-rw-r--r-- | src/main/java/me/Danker/commands/SetPartyCommand.java | 66 |
2 files changed, 0 insertions, 126 deletions
diff --git a/src/main/java/me/Danker/commands/RepartyCommand.java b/src/main/java/me/Danker/commands/RepartyCommand.java deleted file mode 100644 index d3ac7f0..0000000 --- a/src/main/java/me/Danker/commands/RepartyCommand.java +++ /dev/null @@ -1,60 +0,0 @@ -package me.Danker.commands; - -import me.Danker.DankersSkyblockMod; -import net.minecraft.client.Minecraft; -import net.minecraft.command.CommandBase; -import net.minecraft.command.CommandException; -import net.minecraft.command.ICommand; -import net.minecraft.command.ICommandSender; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.util.ChatComponentText; - -public class RepartyCommand extends CommandBase implements ICommand { - public static String[] players; - - @Override - public String getCommandName() { return "reparty"; } - - @Override - public String getCommandUsage(ICommandSender sender) { return "/" + getCommandName(); } - - @Override - public int getRequiredPermissionLevel() { return 0; } - - @Override - public void processCommand(ICommandSender sender, String[] args) throws CommandException { - - final EntityPlayer player = (EntityPlayer) sender; - - if(!SetPartyCommand.set){ - player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "Party unset! use " + SetPartyCommand.getUsage())); - return; - } - try{ - Minecraft.getMinecraft().thePlayer.sendChatMessage("/p disband"); - Thread.sleep(210); - Minecraft.getMinecraft().thePlayer.sendChatMessage("/p " + String.join(" ",players)); - } catch (InterruptedException e) { - e.printStackTrace(); - } - - } - - public static void processCommand() { - - if(!SetPartyCommand.set){ - Minecraft.getMinecraft().thePlayer.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "Party unset! use " + SetPartyCommand.getUsage())); - return; - } - (new Thread(() -> { - try{ - Minecraft.getMinecraft().thePlayer.sendChatMessage("/p disband"); - Thread.sleep(210); - Minecraft.getMinecraft().thePlayer.sendChatMessage("/p " + String.join(" ",players)); - } catch (InterruptedException e) { - e.printStackTrace(); - } - })).start(); - - } -} diff --git a/src/main/java/me/Danker/commands/SetPartyCommand.java b/src/main/java/me/Danker/commands/SetPartyCommand.java deleted file mode 100644 index 40551d3..0000000 --- a/src/main/java/me/Danker/commands/SetPartyCommand.java +++ /dev/null @@ -1,66 +0,0 @@ -package me.Danker.commands; - -import me.Danker.DankersSkyblockMod; -import net.minecraft.client.Minecraft; -import net.minecraft.command.CommandBase; -import net.minecraft.command.CommandException; -import net.minecraft.command.ICommand; -import net.minecraft.command.ICommandSender; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.util.ChatComponentText; -import net.minecraft.util.EnumChatFormatting; - -import java.util.Arrays; - -public class SetPartyCommand extends CommandBase implements ICommand { - - public static boolean set = false; - public static int delimiter = 0; - public static boolean gettingParty; - public static String partyResponse = ""; - - @Override - public String getCommandName() { return "setparty"; } - public static String getName() { return "setparty"; } - - @Override - public String getCommandUsage(ICommandSender sender) { return "/" + getCommandName() + " <Party members>"; } - public static String getUsage(){ return "/" + getName() + " <Party members>"; } - - @Override - public int getRequiredPermissionLevel() { return 0; } - - @Override - public void processCommand(ICommandSender sender, String[] args) throws CommandException { - final EntityPlayer player = (EntityPlayer) sender; - - if(args.length == 0) { - player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "Usage: " + getCommandUsage(sender))); - return; - } - - RepartyCommand.players = args; - - String members = String.join("\n" + EnumChatFormatting.GOLD,RepartyCommand.players); - player.addChatMessage(new ChatComponentText(DankersSkyblockMod.DELIMITER_COLOUR + "" + EnumChatFormatting.BOLD + "-------------------\n" + - EnumChatFormatting.GOLD + members + "\n" + - DankersSkyblockMod.DELIMITER_COLOUR + "" + EnumChatFormatting.BOLD + "-------------------")); - - set = true; - } - - public static void getParty() { - gettingParty = true; - partyResponse = ""; - Minecraft.getMinecraft().thePlayer.sendChatMessage("/pl"); - (new Thread(() ->{ - try{ - Thread.sleep(500); - RepartyCommand.players = Arrays.stream(partyResponse.split(" ")).filter(e -> !e.contains("[") && !e.contains("●")).toArray(String[]::new); - set = true; - } catch (InterruptedException e) { - e.printStackTrace(); - } - })).start(); - } -} |