Implemented PluginEnabled and PluginDisabled
By: Dinnerbone <dinnerbone@dinnerbone.com>
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
|
||||
package org.bukkit.event.server;
|
||||
|
||||
import org.bukkit.plugin.Plugin;
|
||||
|
||||
/**
|
||||
* Used for plugin loaded and unloaded events
|
||||
*/
|
||||
public class PluginEvent extends ServerEvent {
|
||||
private final Plugin plugin;
|
||||
|
||||
public PluginEvent(final Type type, final Plugin plugin) {
|
||||
super(type);
|
||||
|
||||
this.plugin = plugin;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the plugin involved in this event
|
||||
*
|
||||
* @return Plugin for this event
|
||||
*/
|
||||
public Plugin getPlugin() {
|
||||
return plugin;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
|
||||
package org.bukkit.event.server;
|
||||
|
||||
import org.bukkit.event.Event;
|
||||
|
||||
/**
|
||||
* Miscellaneous server events
|
||||
*/
|
||||
public class ServerEvent extends Event {
|
||||
public ServerEvent(final Type type) {
|
||||
super(type);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
|
||||
package org.bukkit.event.server;
|
||||
|
||||
import org.bukkit.event.Listener;
|
||||
|
||||
/**
|
||||
* Handles all miscellaneous server events
|
||||
*/
|
||||
public class ServerListener implements Listener {
|
||||
/**
|
||||
* Called when a plugin is enabled
|
||||
*
|
||||
* @param event Relevant event details
|
||||
*/
|
||||
public void onPluginEnabled(PluginEvent event) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Called when a plugin is disabled
|
||||
*
|
||||
* @param event Relevant event details
|
||||
*/
|
||||
public void onPluginDisabled(PluginEvent event) {
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user