Implemented WorldUnloadEvent and unloadWorld().

This commit is contained in:
Rigby
2011-06-04 06:46:21 +01:00
committed by EvilSeph
parent 888d201388
commit 826bcf1d4a
5 changed files with 57 additions and 0 deletions

View File

@@ -57,6 +57,13 @@ public class WorldListener implements Listener {
throw new AuthorNagException("onWorldLoad has been replaced with a new signature, (WorldLoadEvent)");
}
/**
* Called when a World is unloaded
*
* @param event Relevant event details
*/
public void onWorldUnload(WorldUnloadEvent event) { }
// TODO: Remove after RB
@Deprecated public void onWorldLoad(WorldEvent event) {}
@Deprecated public void onWorldSave(WorldEvent event) {}

View File

@@ -0,0 +1,21 @@
package org.bukkit.event.world;
import org.bukkit.World;
import org.bukkit.event.Cancellable;
public class WorldUnloadEvent extends WorldEvent implements Cancellable {
private boolean isCancelled;
public WorldUnloadEvent(World world) {
super(Type.WORLD_UNLOAD, world);
}
public boolean isCancelled() {
return this.isCancelled;
}
public void setCancelled(boolean cancel) {
this.isCancelled = cancel;
}
}