aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/me/Danker/commands
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/me/Danker/commands')
-rw-r--r--src/main/java/me/Danker/commands/SetPartyCommand.java20
-rw-r--r--src/main/java/me/Danker/commands/SetkeyCommand.java1
2 files changed, 20 insertions, 1 deletions
diff --git a/src/main/java/me/Danker/commands/SetPartyCommand.java b/src/main/java/me/Danker/commands/SetPartyCommand.java
index f840527..40551d3 100644
--- a/src/main/java/me/Danker/commands/SetPartyCommand.java
+++ b/src/main/java/me/Danker/commands/SetPartyCommand.java
@@ -10,9 +10,14 @@ 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"; }
@@ -43,4 +48,19 @@ public class SetPartyCommand extends CommandBase implements ICommand {
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();
+ }
}
diff --git a/src/main/java/me/Danker/commands/SetkeyCommand.java b/src/main/java/me/Danker/commands/SetkeyCommand.java
index db5fb9a..ee4b5a5 100644
--- a/src/main/java/me/Danker/commands/SetkeyCommand.java
+++ b/src/main/java/me/Danker/commands/SetkeyCommand.java
@@ -38,5 +38,4 @@ public class SetkeyCommand extends CommandBase implements ICommand {
ConfigHandler.writeStringConfig("api", "APIKey", arg1[0]);
player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Set API key to " + DankersSkyblockMod.SECONDARY_COLOUR + arg1[0]));
}
-
}