diff options
author | syeyoung <cyoung06@naver.com> | 2023-10-22 01:03:07 +0900 |
---|---|---|
committer | syeyoung <cyoung06@naver.com> | 2023-10-22 18:16:53 +0900 |
commit | 6ae8172f9152ce93c41448f98715b8a230343d11 (patch) | |
tree | 7919aa0db031bc45cf48057128186b08097fd481 | |
parent | 18a855417a3ce0244c159a6db20cf2a5bdef46f0 (diff) | |
download | Skyblock-Dungeons-Guide-6ae8172f9152ce93c41448f98715b8a230343d11.tar.gz Skyblock-Dungeons-Guide-6ae8172f9152ce93c41448f98715b8a230343d11.tar.bz2 Skyblock-Dungeons-Guide-6ae8172f9152ce93c41448f98715b8a230343d11.zip |
- only send stomp when is actually connected
Signed-off-by: syeyoung <cyoung06@naver.com>
-rw-r--r-- | mod/src/main/java/kr/syeyoung/dungeonsguide/mod/party/PartyManager.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/party/PartyManager.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/party/PartyManager.java index 51d374d3..80dad6c8 100644 --- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/party/PartyManager.java +++ b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/party/PartyManager.java @@ -431,13 +431,16 @@ public class PartyManager { } private void leaveParty() { + + if (partyContext != null) { getPartyContext().setPartyExistHypixel(false); if (getPartyContext().isSelfSolo()) return; if (getPartyContext().getPartyID() != null) { JSONObject object = new JSONObject(); object.put("partyid", getPartyContext().getPartyID()); - StompManager.getInstance().send(new StompPayload().payload(object.toString()).destination( "/app/party.leave")); + if (StompManager.getInstance().isStompConnected()) + StompManager.getInstance().send(new StompPayload().payload(object.toString()).destination( "/app/party.leave")); } } @@ -450,6 +453,7 @@ public class PartyManager { getPartyContext().setPartyMember(new TreeSet<>(String.CASE_INSENSITIVE_ORDER)); getPartyContext().setModeratorComplete(true); getPartyContext().setAllInvite(false); joinedParty(); + } private void joinedParty() { JSONArray jsonArray = new JSONArray(); |