SPIGOT-4900: Rearchitect multiworld support for better compat with new villager AI

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2019-05-12 11:15:48 +10:00
parent 8b207fdf78
commit b407bebd8d
22 changed files with 208 additions and 227 deletions

View File

@@ -198,7 +198,7 @@ public class CraftEventFactory {
WorldServer worldServer = world.getHandle();
int spawnSize = Bukkit.getServer().getSpawnRadius();
if (world.getHandle().dimension != DimensionManager.OVERWORLD) return true;
if (world.getHandle().getWorldProvider().getDimensionManager() != DimensionManager.OVERWORLD) return true;
if (spawnSize <= 0) return true;
if (((CraftServer) Bukkit.getServer()).getHandle().getOPs().isEmpty()) return true;
if (player.isOp()) return true;