Added custom world generator API
By: Dinnerbone <dinnerbone@dinnerbone.com>
This commit is contained in:
@@ -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
|
||||
*/
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
@@ -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
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user