mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-12-03 07:54:30 +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();
|
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);
|
event.setCancelled(true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -649,7 +651,6 @@ public void onCreatureSpawn(CreatureSpawnEvent event) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Set<com.sk89q.worldedit.world.entity.EntityType> entityTypes = set.queryValue(null, Flags.DENY_SPAWN);
|
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)) {
|
if (entityTypes != null && weEntityType != null && entityTypes.contains(weEntityType)) {
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user