Check if player is in arena on food level change.
This commit fixes a bug introduced in 88ddbe5ac6.
During a food level change event, if the arena is running and the food level lock is enabled, we just need to also make sure that the given player is actually in the arena, otherwise it affects everyone on the server.
Fixes #557
This commit is contained in:
@@ -898,7 +898,7 @@ public class ArenaListener
|
|||||||
Player p = (Player) event.getEntity();
|
Player p = (Player) event.getEntity();
|
||||||
|
|
||||||
if (arena.isRunning()) {
|
if (arena.isRunning()) {
|
||||||
if (lockFoodLevel) {
|
if (arena.inArena(p) && lockFoodLevel) {
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user