Permalink
Browse files

Fixed blockCreatureSpawn not working.

  • Loading branch information...
me4502 committed Sep 26, 2018
1 parent 87e5770 commit 01dfebe531b52e6d6610f9d62582bfb1634b79f8
@@ -632,7 +632,9 @@ public void onCreatureSpawn(CreatureSpawnEvent event) {
EntityType entityType = event.getEntityType();
if (wcfg.blockCreatureSpawn.contains(entityType)) {
com.sk89q.worldedit.world.entity.EntityType weEntityType = BukkitAdapter.adapt(entityType);
if (weEntityType != null && wcfg.blockCreatureSpawn.contains(weEntityType)) {
event.setCancelled(true);
return;
}
@@ -649,7 +651,6 @@ public void onCreatureSpawn(CreatureSpawnEvent event) {
}
Set<com.sk89q.worldedit.world.entity.EntityType> entityTypes = set.queryValue(null, Flags.DENY_SPAWN);
com.sk89q.worldedit.world.entity.EntityType weEntityType = BukkitAdapter.adapt(entityType);
if (entityTypes != null && weEntityType != null && entityTypes.contains(weEntityType)) {
event.setCancelled(true);
return;

0 comments on commit 01dfebe

Please sign in to comment.