From f487d2f3afa88dffddcc340fe2036afa3c84f611 Mon Sep 17 00:00:00 2001 From: AlexTheCoder Date: Sat, 26 Aug 2017 02:52:37 -0400 Subject: [PATCH] Prevent clans from spamming users with invites --- .../src/mineplex/game/clans/clans/ClansUtility.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/ClansUtility.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/ClansUtility.java index 3b2138939..2a991759a 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/ClansUtility.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/ClansUtility.java @@ -1228,6 +1228,12 @@ public class ClansUtility UtilPlayer.message(caller, F.main("Clans", "You cannot invite more members until you remove some allies.")); return; } + + if (clan.getInviteeMap().containsKey(target.getName())) + { + UtilPlayer.message(caller, F.main("Clans", "Your Clan has already invited " + F.elem(target.getName()) + ".")); + return; + } // Inform clan.inform(F.name(caller.getName()) + " invited " + F.name(target.getName()) + " to join your Clan.", caller.getName());