From 38d1f9e9ea10519dfd9e82f5639265d5c98a0cc0 Mon Sep 17 00:00:00 2001 From: AlessioDP Date: Mon, 8 Oct 2018 21:12:01 +0200 Subject: [PATCH] Update 2.4.4 --- api/pom.xml | 2 +- bukkit/pom.xml | 2 +- bungee/pom.xml | 2 +- common/pom.xml | 2 +- .../com/alessiodp/parties/common/listeners/ChatListener.java | 5 ++--- .../alessiodp/parties/common/parties/objects/PartyImpl.java | 2 +- output/pom.xml | 2 +- pom.xml | 2 +- 8 files changed, 9 insertions(+), 10 deletions(-) diff --git a/api/pom.xml b/api/pom.xml index ef8600366..f42395034 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -4,7 +4,7 @@ com.alessiodp.parties Parties - 2.4.3 + 2.4.4 parties-api diff --git a/bukkit/pom.xml b/bukkit/pom.xml index 7e92bb061..8f9ccf581 100644 --- a/bukkit/pom.xml +++ b/bukkit/pom.xml @@ -5,7 +5,7 @@ com.alessiodp.parties Parties - 2.4.3 + 2.4.4 parties-bukkit diff --git a/bungee/pom.xml b/bungee/pom.xml index 368ddbdcc..c15fd2c59 100644 --- a/bungee/pom.xml +++ b/bungee/pom.xml @@ -3,7 +3,7 @@ com.alessiodp.parties Parties - 2.4.3 + 2.4.4 parties-bungee diff --git a/common/pom.xml b/common/pom.xml index 94bb94f3c..fffd56976 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -7,7 +7,7 @@ Parties com.alessiodp.parties - 2.4.3 + 2.4.4 parties-common diff --git a/common/src/main/java/com/alessiodp/parties/common/listeners/ChatListener.java b/common/src/main/java/com/alessiodp/parties/common/listeners/ChatListener.java index c7b07ab12..0aa379d08 100644 --- a/common/src/main/java/com/alessiodp/parties/common/listeners/ChatListener.java +++ b/common/src/main/java/com/alessiodp/parties/common/listeners/ChatListener.java @@ -31,7 +31,8 @@ protected boolean onPlayerChat(User sender, String message) { PartyPlayerImpl pp = plugin.getPlayerManager().getPlayer(sender.getUUID()); boolean partyChat = false; - if (!pp.getPartyName().isEmpty()) { + PartyImpl party = pp.getPartyName().isEmpty() ? null : plugin.getPartyManager().getParty(pp.getPartyName()); + if (party != null) { if (pp.isChatParty()) { partyChat = true; } else if (ConfigParties.GENERAL_CHAT_DIRECT_ENABLED && message.startsWith(ConfigParties.GENERAL_CHAT_DIRECT_PREFIX)) { @@ -69,8 +70,6 @@ protected boolean onPlayerChat(User sender, String message) { } if (!mustWait) { - PartyImpl party = plugin.getPartyManager().getParty(pp.getPartyName()); - // Calling API event IChatEvent partiesChatEvent = plugin.getEventManager().prepareChatEvent(pp, party, finalMessage); plugin.getEventManager().callEvent(partiesChatEvent); diff --git a/common/src/main/java/com/alessiodp/parties/common/parties/objects/PartyImpl.java b/common/src/main/java/com/alessiodp/parties/common/parties/objects/PartyImpl.java index e5fd4bc4c..7b42d2a34 100644 --- a/common/src/main/java/com/alessiodp/parties/common/parties/objects/PartyImpl.java +++ b/common/src/main/java/com/alessiodp/parties/common/parties/objects/PartyImpl.java @@ -188,7 +188,7 @@ public void acceptInvite(UUID invitedPlayer) { sendBroadcast(invitedPlayerPp, Messages.MAINCMD_ACCEPT_BROADCAST); - getMembers().add(invitedBy); + getMembers().add(invitedPlayer); onlinePlayers.add(invitedPlayerPp); invitedPlayerPp.setPartyName(getName()); diff --git a/output/pom.xml b/output/pom.xml index 816724ba2..ea6a8ccf2 100644 --- a/output/pom.xml +++ b/output/pom.xml @@ -5,7 +5,7 @@ Parties com.alessiodp.parties - 2.4.3 + 2.4.4 4.0.0 diff --git a/pom.xml b/pom.xml index 54adb2e69..648010791 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ com.alessiodp.parties Parties - 2.4.3 + 2.4.4 pom Parties