aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/kr/syeyoung/dungeonsguide/party
diff options
context:
space:
mode:
authorsyeyoung <cyong06@naver.com>2021-04-28 17:35:58 +0900
committersyeyoung <cyong06@naver.com>2021-04-28 17:35:58 +0900
commit3b4d4a96f7b246ee3d07f82a78c1e9cf5de91300 (patch)
tree211cec844864c98e37ef1d97bf74fc461230ab16 /src/main/java/kr/syeyoung/dungeonsguide/party
parent31962f3cd061697fe7596102632f471ff01cb6c8 (diff)
downloadSkyblock-Dungeons-Guide-3b4d4a96f7b246ee3d07f82a78c1e9cf5de91300.tar.gz
Skyblock-Dungeons-Guide-3b4d4a96f7b246ee3d07f82a78c1e9cf5de91300.tar.bz2
Skyblock-Dungeons-Guide-3b4d4a96f7b246ee3d07f82a78c1e9cf5de91300.zip
ok done
Diffstat (limited to 'src/main/java/kr/syeyoung/dungeonsguide/party')
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/party/PartyManager.java14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/party/PartyManager.java b/src/main/java/kr/syeyoung/dungeonsguide/party/PartyManager.java
index 2ba47dfc..8f938ca3 100644
--- a/src/main/java/kr/syeyoung/dungeonsguide/party/PartyManager.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/party/PartyManager.java
@@ -23,10 +23,8 @@ import org.json.JSONArray;
import org.json.JSONObject;
import java.security.SecureRandom;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Set;
+import java.util.*;
+import java.util.function.Consumer;
public class PartyManager implements StompMessageHandler {
public static final PartyManager INSTANCE = new PartyManager();
@@ -46,6 +44,10 @@ public class PartyManager implements StompMessageHandler {
private int invitedDash =0;
@Getter
+ private Queue<Consumer<Set<String>>> runOnMembersReceived = new LinkedList<>();
+
+
+ @Getter
@Setter
private int maxParty = 5;
@@ -141,6 +143,10 @@ public class PartyManager implements StompMessageHandler {
if (partyJoin == 2 || partyJoin == 100) {
partyJoin = 0;
// REQ PARTY JOIN
+ Consumer<Set<String>> r;
+ while ((r = runOnMembersReceived.poll()) != null){
+ r.accept(members);
+ }
JSONArray jsonArray = new JSONArray();
for (String member : members) {