Fix RaidManager ONLY allowing players with PvP timers into the raid :P
This commit is contained in:
parent
0949ceadd3
commit
c265beddb1
@ -78,7 +78,7 @@ public class RaidManager extends MiniPlugin
|
|||||||
_raids.clear();
|
_raids.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean isEligible(Player player)
|
private boolean isIneligible(Player player)
|
||||||
{
|
{
|
||||||
if (ClansManager.getInstance().hasTimer(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!"));
|
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()
|
public DisguiseManager getDisguiseManager()
|
||||||
@ -143,7 +143,7 @@ public class RaidManager extends MiniPlugin
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
Set<Player> inside = UtilPlayer.getInRadius(player.getLocation(), 4).keySet();
|
Set<Player> inside = UtilPlayer.getInRadius(player.getLocation(), 4).keySet();
|
||||||
inside.removeIf(this::isEligible);
|
inside.removeIf(this::isIneligible);
|
||||||
if (inside.size() > MAX_PARTICIPANTS)
|
if (inside.size() > MAX_PARTICIPANTS)
|
||||||
{
|
{
|
||||||
UtilPlayer.message(player, F.main(type.getRaidName() + " Raid", "You cannot start a raid with more than " + MAX_PARTICIPANTS + " participants!"));
|
UtilPlayer.message(player, F.main(type.getRaidName() + " Raid", "You cannot start a raid with more than " + MAX_PARTICIPANTS + " participants!"));
|
||||||
|
Loading…
Reference in New Issue
Block a user