mirror of
https://github.com/garbagemule/MobArena.git
synced 2025-02-14 03:21:29 +01:00
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:
parent
7f1c4b1b87
commit
ba41e51e48
@ -898,7 +898,7 @@ public class ArenaListener
|
||||
Player p = (Player) event.getEntity();
|
||||
|
||||
if (arena.isRunning()) {
|
||||
if (lockFoodLevel) {
|
||||
if (arena.inArena(p) && lockFoodLevel) {
|
||||
event.setCancelled(true);
|
||||
}
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user