Prevent players using the gui to bypass join cooldowns

This commit is contained in:
AlexTheCoder 2016-08-05 14:24:56 -04:00
parent e01b57ceac
commit ce6a0b376c

View File

@ -608,6 +608,12 @@ public class ClansUtility
return;
}
if (_clansManager.leftRecently(caller.getUniqueId(), 20 * 60 * 1000) != null)
{
UtilPlayer.message(caller, F.main("Clans", "You cannot join a Clan for " + C.mTime + UtilTime.MakeStr(_clansManager.leftRecently(caller.getUniqueId(), 20 * 60 * 1000).getRight()) + C.mBody + "."));
return;
}
if (!_clansManager.Get(caller).canJoin())
{
UtilPlayer.message(caller, F.main("Clans", "You cannot join a Clan for " + C.mTime + UtilTime.convertString(System.currentTimeMillis() - _clansManager.Get(caller).getDelay(), 1, UtilTime.TimeUnit.FIT) + C.mBody + "."));