aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorSychic <Sychic@github.com>2020-12-18 10:34:43 -0500
committerSychic <Sychic@github.com>2020-12-18 10:34:43 -0500
commit20034c5391551471ab9d534002c1167dbe87aba4 (patch)
treeb38334caea683c1660c831c02519b8b74542a394 /src/main
parent6baa9f89600d23e0b7265b0a30d6003b928bf4a0 (diff)
downloadSkyblockMod-20034c5391551471ab9d534002c1167dbe87aba4.tar.gz
SkyblockMod-20034c5391551471ab9d534002c1167dbe87aba4.tar.bz2
SkyblockMod-20034c5391551471ab9d534002c1167dbe87aba4.zip
Separate partying thread to allow for it to wait separately from main thread.
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/me/Danker/commands/RepartyCommand.java16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/main/java/me/Danker/commands/RepartyCommand.java b/src/main/java/me/Danker/commands/RepartyCommand.java
index 1658298..d3ac7f0 100644
--- a/src/main/java/me/Danker/commands/RepartyCommand.java
+++ b/src/main/java/me/Danker/commands/RepartyCommand.java
@@ -46,13 +46,15 @@ public class RepartyCommand extends CommandBase implements ICommand {
Minecraft.getMinecraft().thePlayer.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();
- }
+ (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();
}
}