Skip to content

Commit

Permalink
EliteMobs 8.7.13
Browse files Browse the repository at this point in the history
- [New] Added new story-mode dungeon, The Quarry! Currently in early access for Patreon supporters
- [Critical fix] Bugs related to crashes and errors when creating / removing instanced dungeons should now be fixed

Signed-off-by: MagmaGuy <tiagoarnaut@gmail.com>
  • Loading branch information
MagmaGuy committed May 29, 2024
1 parent f7349ce commit 85ec676
Showing 1 changed file with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -234,21 +234,23 @@ public void run() {
//The world might get removed before this timer
//if (world != null) {
//Arrays.stream(world.getLoadedChunks()).forEach(chunk -> chunk.unload(false));

new EventCaller(new InstancedDungeonRemoveEvent(dungeonInstance));
dungeonInstances.remove(dungeonInstance);

if (!Bukkit.unloadWorld(world, false)) {
new WarningMessage("Failed to unload world " + instancedWorldName + " ! This is bad, report this to the developer!");
return;
}
new BukkitRunnable() {
@Override
public void run() {
WorldInstantiator.recursivelyDelete(instancedWorldFile);
}
}.runTaskAsynchronously(MetadataHandler.PLUGIN);
}.runTaskLaterAsynchronously(MetadataHandler.PLUGIN, 20L * 60 * 2); //wait 2 minutes after unloading world before removing files
//}
new EventCaller(new InstancedDungeonRemoveEvent(dungeonInstance));
dungeonInstances.remove(dungeonInstance);
}
}.runTaskLater(MetadataHandler.PLUGIN, 120);

}.runTaskLater(MetadataHandler.PLUGIN, 20*30L); //wait 30 seconds before unloading world
}

private void setDifficulty(String difficultyName) {
Expand Down

0 comments on commit 85ec676

Please sign in to comment.