Added custom world generator API

By: Dinnerbone <dinnerbone@dinnerbone.com>
This commit is contained in:
Bukkit/Spigot
2011-06-06 13:23:30 +01:00
parent 63a68b3e10
commit 6ad28ba607
8 changed files with 144 additions and 0 deletions

View File

@@ -471,6 +471,10 @@ public abstract class Event implements Serializable {
*
*/
WORLD_SAVE (Category.WORLD),
/**
* Called when a World is initializing
*/
WORLD_INIT (Category.WORLD),
/**
* Called when a World is loaded
*/

View File

@@ -0,0 +1,9 @@
package org.bukkit.event.world;
import org.bukkit.World;
public class WorldInitEvent extends WorldEvent {
public WorldInitEvent(World world) {
super(Type.WORLD_INIT, world);
}
}

View File

@@ -39,6 +39,14 @@ public class WorldListener implements Listener {
throw new AuthorNagException("onWorldSave has been replaced with a new signature, (WorldSaveEvent)");
}
/**
* Called when a World is initializing
*
* @param event Relevant event details
*/
public void onWorldInit(WorldInitEvent event) {
}
/**
* Called when a World is loaded
*