aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
authorsyeyoung <cyougn06@naver.com>2022-01-31 16:58:40 +0900
committersyeyoung <cyougn06@naver.com>2022-01-31 16:58:40 +0900
commit5135d001b15890b76c5ad5d467e03a7e4ab324ea (patch)
tree112f9b3a6ee0c63ab99f0f72c9e323dfdee4c2f7 /src/main/java
parent7880ca8205967bd4771fcdfbb897e0ef6e37e82e (diff)
downloadSkyblock-Dungeons-Guide-5135d001b15890b76c5ad5d467e03a7e4ab324ea.tar.gz
Skyblock-Dungeons-Guide-5135d001b15890b76c5ad5d467e03a7e4ab324ea.tar.bz2
Skyblock-Dungeons-Guide-5135d001b15890b76c5ad5d467e03a7e4ab324ea.zip
- add "Party was transfered to X because Y left"
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/chat/PartyManager.java14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/chat/PartyManager.java b/src/main/java/kr/syeyoung/dungeonsguide/chat/PartyManager.java
index 72261ae9..fce62813 100644
--- a/src/main/java/kr/syeyoung/dungeonsguide/chat/PartyManager.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/chat/PartyManager.java
@@ -228,11 +228,21 @@ public class PartyManager implements StompMessageHandler {
newLeader = s;
break;
}
- String oldLeader = messageSplit[messageSplit.length-1];
+ String oldLeader;
+ boolean left= false;
+ if (str.endsWith("§r§eleft§r")) {
+ oldLeader = messageSplit[messageSplit.length-2];
+ left = true;
+ } else {
+ oldLeader = messageSplit[messageSplit.length-1];
+ }
if (oldLeader != null && newLeader != null ) {
getPartyContext(true).setPartyOwner(newLeader);
- getPartyContext(true).addPartyModerator(oldLeader);
+ if (left)
+ getPartyContext(true).removeFromParty(oldLeader);
+ else
+ getPartyContext(true).addPartyModerator(oldLeader);
}
a.put("type", "party_transfer");
potentialInvitenessChange();