mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2024-11-12 13:54:22 +01:00
Fix to fire Island events after an island is created.
Events were firing too early before the island had been fully pasted async.
This commit is contained in:
parent
8452a080f7
commit
2713f58ac5
@ -172,19 +172,6 @@ public class NewIsland {
|
||||
// Delete the old island
|
||||
plugin.getIslands().deleteIsland(oldIsland, true);
|
||||
}
|
||||
});
|
||||
// Make nether island
|
||||
if (plugin.getIWM().isNetherGenerate(world) && plugin.getIWM().isNetherIslands(world) && plugin.getIWM().getNetherWorld(world) != null) {
|
||||
plugin.getSchemsManager().paste(plugin.getIWM().getNetherWorld(world), island, "nether-" + name);
|
||||
}
|
||||
|
||||
// Make end island
|
||||
if (plugin.getIWM().isEndGenerate(world) && plugin.getIWM().isEndIslands(world) && plugin.getIWM().getEndWorld(world) != null) {
|
||||
plugin.getSchemsManager().paste(plugin.getIWM().getEndWorld(world), island, "end-" + name);
|
||||
}
|
||||
|
||||
// Set default settings
|
||||
island.setFlagsDefaults();
|
||||
|
||||
// Fire exit event
|
||||
Reason reasonDone = Reason.CREATED;
|
||||
@ -204,6 +191,19 @@ public class NewIsland {
|
||||
.island(island)
|
||||
.location(island.getCenter())
|
||||
.build();
|
||||
});
|
||||
// Make nether island
|
||||
if (plugin.getIWM().isNetherGenerate(world) && plugin.getIWM().isNetherIslands(world) && plugin.getIWM().getNetherWorld(world) != null) {
|
||||
plugin.getSchemsManager().paste(plugin.getIWM().getNetherWorld(world), island, "nether-" + name);
|
||||
}
|
||||
|
||||
// Make end island
|
||||
if (plugin.getIWM().isEndGenerate(world) && plugin.getIWM().isEndIslands(world) && plugin.getIWM().getEndWorld(world) != null) {
|
||||
plugin.getSchemsManager().paste(plugin.getIWM().getEndWorld(world), island, "end-" + name);
|
||||
}
|
||||
|
||||
// Set default settings
|
||||
island.setFlagsDefaults();
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user