Guard against non-living entities in MACreature.
This should prevent runtime errors where MobArena tries to spawn non-living entities, causing arenas to get locked up. Fixes #438
This commit is contained in:
@@ -29,10 +29,12 @@ public class MACreature
|
||||
static {
|
||||
map = new HashMap<>();
|
||||
for (EntityType type : EntityType.values()) {
|
||||
if (type.isAlive()) {
|
||||
// Instantiating a new creature registers it
|
||||
new MACreature(type);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Default creatures
|
||||
public static final MACreature ZOMBIE = new MACreature("zombie", EntityType.ZOMBIE);
|
||||
|
||||
Reference in New Issue
Block a user