mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-11-30 06:23:49 +01:00
Fixed blockCreatureSpawn not working.
This commit is contained in:
parent
87e5770405
commit
01dfebe531
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user