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,8 +29,10 @@ public class MACreature
|
||||
static {
|
||||
map = new HashMap<>();
|
||||
for (EntityType type : EntityType.values()) {
|
||||
// Instantiating a new creature registers it
|
||||
new MACreature(type);
|
||||
if (type.isAlive()) {
|
||||
// Instantiating a new creature registers it
|
||||
new MACreature(type);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user