mirror of
https://github.com/taoneill/war.git
synced 2025-02-19 21:02:03 +01:00
Now checking if War is laoded in entity_death.
This commit is contained in:
parent
b057cac73d
commit
f7e0b73465
@ -440,7 +440,10 @@ public class WarEntityListener extends EntityListener {
|
||||
|
||||
@Override
|
||||
public void onEntityDeath(EntityDeathEvent event) {
|
||||
if (event.getEntity() instanceof Player) {
|
||||
if (!War.war.isLoaded() || !(event.getEntity() instanceof Player)) {
|
||||
return;
|
||||
}
|
||||
|
||||
Player player = (Player) event.getEntity();
|
||||
Warzone zone = Warzone.getZoneByPlayerName(player.getName());
|
||||
if (zone != null) {
|
||||
@ -452,6 +455,5 @@ public class WarEntityListener extends EntityListener {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user