SPIGOT-6526: World entities are not populated when plugin onEnable is called

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2021-06-13 15:05:32 +10:00
parent 085885b64a
commit d5a68b79c1
3 changed files with 25 additions and 20 deletions

View File

@@ -1056,6 +1056,7 @@ public final class CraftServer implements Server {
console.levels.put(internal.getDimensionKey(), internal);
getServer().loadSpawn(internal.getChunkProvider().chunkMap.progressListener, internal);
internal.entityManager.a(); // SPIGOT-6526: Load pending entities so they are available to the API
pluginManager.callEvent(new WorldLoadEvent(internal.getWorld()));
return internal.getWorld();