Fix RaidManager ONLY allowing players with PvP timers into the raid :P

This commit is contained in:
AlexTheCoder 2018-01-26 13:45:59 -05:00 committed by Alexander Meech
parent 0949ceadd3
commit c265beddb1
1 changed files with 4 additions and 4 deletions

View File

@ -78,7 +78,7 @@ public class RaidManager extends MiniPlugin
_raids.clear();
}
private boolean isEligible(Player player)
private boolean isIneligible(Player player)
{
if (ClansManager.getInstance().hasTimer(player))
{
@ -86,10 +86,10 @@ public class RaidManager extends MiniPlugin
{
UtilPlayer.message(player, F.main(getName(), "You cannot enter a Raid whilst protected from PvP. Run " + F.elem("/pvp") + " to enable PvP!"));
}
return false;
return true;
}
return true;
return false;
}
public DisguiseManager getDisguiseManager()
@ -143,7 +143,7 @@ public class RaidManager extends MiniPlugin
return false;
}
Set<Player> inside = UtilPlayer.getInRadius(player.getLocation(), 4).keySet();
inside.removeIf(this::isEligible);
inside.removeIf(this::isIneligible);
if (inside.size() > MAX_PARTICIPANTS)
{
UtilPlayer.message(player, F.main(type.getRaidName() + " Raid", "You cannot start a raid with more than " + MAX_PARTICIPANTS + " participants!"));