From 647ad2b62ae5606cbfff6f8a018ba262c89bf000 Mon Sep 17 00:00:00 2001 From: Teriuihi Date: Tue, 15 Feb 2022 03:20:05 +0100 Subject: [PATCH] Added party leave notif --- api/src/main/java/com/alttd/chat/config/Config.java | 3 ++- .../alttd/velocitychat/commands/partysubcommands/Leave.java | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/api/src/main/java/com/alttd/chat/config/Config.java b/api/src/main/java/com/alttd/chat/config/Config.java index 615700a..ad9914b 100755 --- a/api/src/main/java/com/alttd/chat/config/Config.java +++ b/api/src/main/java/com/alttd/chat/config/Config.java @@ -263,7 +263,8 @@ public final class Config { public static String PLAYER_JOINED_PARTY = " joined !"; public static String NOTIFY_FINDING_NEW_OWNER = "Since you own this chat party a new party owner will be chosen."; public static String LEFT_PARTY = "You have left the chat party!"; - public static String OWNER_LEFT_PARTY = "[ChatParty]: left the chat party, the new party owner is "; + public static String OWNER_LEFT_PARTY = "[ChatParty]: left the chat party, the new party owner is "; + public static String PLAYER_LEFT_PARTY = "[ChatParty]: left the chat party!"; public static String NEW_PARTY_OWNER = "[ChatParty]: transferred the party to !"; public static String CANT_REMOVE_PARTY_OWNER = "You can't remove yourself, please leave instead."; public static String REMOVED_FROM_PARTY = "You were removed from the '' chat party."; diff --git a/velocity/src/main/java/com/alttd/velocitychat/commands/partysubcommands/Leave.java b/velocity/src/main/java/com/alttd/velocitychat/commands/partysubcommands/Leave.java index def827b..7a37729 100644 --- a/velocity/src/main/java/com/alttd/velocitychat/commands/partysubcommands/Leave.java +++ b/velocity/src/main/java/com/alttd/velocitychat/commands/partysubcommands/Leave.java @@ -53,6 +53,10 @@ public class Leave implements SubCommand { } } else { source.sendMessage(Utility.parseMiniMessage(Config.LEFT_PARTY)); + VelocityChat.getPlugin().getChatHandler().sendPartyMessage(party, + Utility.parseMiniMessage(Config.PLAYER_LEFT_PARTY, + Placeholder.miniMessage("player_name", player.getUsername()) + ), null); } }