2010-12-04 09:27:51 +01:00
|
|
|
import java.util.logging.Logger;
|
|
|
|
|
|
|
|
//=====================================================================
|
|
|
|
//Class: vMinecraftPlugin
|
|
|
|
//Use: Starts the plugin
|
|
|
|
//Author: nossr50, TrapAlice, cerevisiae
|
|
|
|
//=====================================================================
|
|
|
|
public class vMinecraft extends Plugin {
|
|
|
|
static final vMinecraftListener listener = new vMinecraftListener();
|
|
|
|
protected static final Logger log = Logger.getLogger("Minecraft");
|
|
|
|
|
|
|
|
public void enable() {
|
|
|
|
vMinecraftSettings.getInstance().loadSettings();
|
2010-12-12 20:40:39 +01:00
|
|
|
vMinecraftUsers.getInstance().loadUsers();
|
2010-12-04 09:27:51 +01:00
|
|
|
vMinecraftCommands.loadCommands();
|
2010-12-20 12:52:31 +01:00
|
|
|
/*while(true){
|
|
|
|
if (etc.getServer().getTime() == 0){
|
2010-12-20 12:31:01 +01:00
|
|
|
vMinecraftChat.gmsg(Colors.Rose + "The sun has risen, it is now safe to punch trees");
|
|
|
|
}
|
|
|
|
if (etc.getServer().getTime() == 13000){
|
|
|
|
vMinecraftChat.gmsg(Colors.Rose + "What a terrible night to have a curse");
|
|
|
|
}
|
2010-12-20 12:52:31 +01:00
|
|
|
}
|
|
|
|
*
|
|
|
|
*/
|
2010-12-04 09:27:51 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
public void disable() {
|
|
|
|
//And remove the commands here.
|
|
|
|
}
|
|
|
|
|
|
|
|
public void initialize() {
|
|
|
|
//Here we add the hook we're going to use. In this case it's the arm swing event.
|
|
|
|
etc.getLoader().addListener(PluginLoader.Hook.CHAT, listener, this, PluginListener.Priority.MEDIUM);
|
|
|
|
etc.getLoader().addListener(PluginLoader.Hook.LOGIN, listener, this, PluginListener.Priority.MEDIUM);
|
|
|
|
etc.getLoader().addListener(PluginLoader.Hook.COMMAND, listener, this, PluginListener.Priority.HIGH);
|
|
|
|
etc.getLoader().addListener(PluginLoader.Hook.IGNITE, listener, this, PluginListener.Priority.HIGH);
|
|
|
|
etc.getLoader().addListener(PluginLoader.Hook.DAMAGE, listener, this, PluginListener.Priority.MEDIUM);
|
|
|
|
etc.getLoader().addListener(PluginLoader.Hook.EXPLODE, listener, this, PluginListener.Priority.HIGH);
|
2010-12-08 05:02:12 +01:00
|
|
|
etc.getLoader().addListener(PluginLoader.Hook.LIQUID_DESTROY, listener, this, PluginListener.Priority.MEDIUM);
|
2010-12-04 09:27:51 +01:00
|
|
|
etc.getLoader().addListener(PluginLoader.Hook.HEALTH_CHANGE, listener, this, PluginListener.Priority.MEDIUM);
|
2010-12-16 01:22:48 +01:00
|
|
|
etc.getLoader().addListener(PluginLoader.Hook.PLAYER_MOVE, listener, this, PluginListener.Priority.MEDIUM);
|
2010-12-04 09:27:51 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|