ButtonArchives/src/buttondevteam/MainPlugin.java

42 lines
1.3 KiB
Java
Raw Normal View History

2016-06-23 18:08:25 +00:00
package buttondevteam;
import java.util.logging.Logger;
import org.bukkit.plugin.PluginDescriptionFile;
import org.bukkit.plugin.java.JavaPlugin;
import buttondevteam.alisolarflare.aliarrowtrail.AliArrowListener;
2016-06-23 18:08:25 +00:00
public class MainPlugin extends JavaPlugin{
private PluginDescriptionFile pdfFile;
private Logger logger;
private AliArrowListener aliArrowListener;
2016-06-23 18:08:25 +00:00
public void onEnable(){
//Logs "Plugin Enabled", registers commands
pdfFile = getDescription();
logger = getLogger();
logger.info(pdfFile.getName() + " has been started (V." + pdfFile.getVersion()+ ").");
registerCommands();
registerEvents();
logger.info(pdfFile.getName() + " has been Enabled (V." + pdfFile.getVersion()+ ").");
}
public void onDisable(){
logger.info(pdfFile.getName() + " has been Disabled (V." + pdfFile.getVersion()+ ").");
}
public void registerCommands(){
//Example command: getCommand("createShrine").setExecutor(new CreateShrine(this));
}
public void registerEvents(){
//Example INIT: midnightListener = new MidnightListener(this);
//Example Event: getServer().getPluginManager().registerEvents(midnightListener, this);
//INIT
aliArrowListener = new AliArrowListener(this);
2016-06-23 18:08:25 +00:00
//EVENTS
getServer().getPluginManager().registerEvents(aliArrowListener, this);
2016-06-23 18:08:25 +00:00
}
}