#1004: Call WorldInitEvent before any chunks are generated

By: DerFrZocker <derrieple@gmail.com>
This commit is contained in:
CraftBukkit/Spigot 2022-02-01 08:13:13 +11:00
parent 99e0adb83b
commit e2b1313f00

View file

@ -143,7 +143,7 @@
if (profiledduration != null) {
profiledduration.finish();
}
@@ -358,35 +417,203 @@
@@ -358,36 +417,206 @@
}
@ -369,9 +369,12 @@
+ worldserver.getWorld().getPopulators().addAll(worldserver.generator.getDefaultPopulators(worldserver.getWorld()));
+ }
WorldBorder worldborder = worldserver.getWorldBorder();
+ worldborder.applySettings(iworlddataserver.getWorldBorder()); // CraftBukkit - move up so that WorldBorder is set during WorldInitEvent
+ this.server.getPluginManager().callEvent(new org.bukkit.event.world.WorldInitEvent(worldserver.getWorld())); // CraftBukkit - SPIGOT-5569: Call WorldInitEvent before any chunks are generated
if (!iworlddataserver.isInitialized()) {
@@ -411,31 +638,10 @@
try {
@@ -411,31 +640,8 @@
iworlddataserver.setInitialized(true);
}
@ -398,8 +401,7 @@
- }
- }
-
worldborder.applySettings(iworlddataserver.getWorldBorder());
+ this.server.getPluginManager().callEvent(new org.bukkit.event.world.WorldInitEvent(worldserver.getWorld())); // CraftBukkit - SPIGOT-5569
- worldborder.applySettings(iworlddataserver.getWorldBorder());
}
+ // CraftBukkit end