Move WorldSaveEvent to proper location

calling CraftWorld.save() currently does not call WorldSaveEvent, and WorldSaveEvent could fire on worlds that have saving disabled.

New location will always fire during a world save and only during an actual save.

By: Aikar <aikar@aikar.co>
This commit is contained in:
CraftBukkit/Spigot
2014-12-03 14:35:33 -05:00
parent f03d75f288
commit 41eaea21ca
3 changed files with 42 additions and 46 deletions

View File

@@ -935,8 +935,6 @@ public final class CraftServer implements Server {
try {
handle.save(true, null);
handle.saveLevel();
WorldSaveEvent event = new WorldSaveEvent(handle.getWorld());
getPluginManager().callEvent(event);
} catch (ExceptionWorldConflict ex) {
getLogger().log(Level.SEVERE, null, ex);
}