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