com.quartercode.quarterbukkit
Class QuarterBukkit

java.lang.Object
  extended by org.bukkit.plugin.PluginBase
      extended by org.bukkit.plugin.java.JavaPlugin
          extended by com.quartercode.quarterbukkit.QuarterBukkit
All Implemented Interfaces:
org.bukkit.command.CommandExecutor, org.bukkit.command.TabCompleter, org.bukkit.command.TabExecutor, org.bukkit.plugin.Plugin

public class QuarterBukkit
extends org.bukkit.plugin.java.JavaPlugin

The main class of the QuarterBukkit API. This is for easy API loading.


Constructor Summary
QuarterBukkit()
          The default constructor for Bukkit.
 
Method Summary
static void exception(GameException exception)
          Handles an GameException in the correct ExceptionHandler.
 Config getConfig()
           
static ExceptionHandler getExceptionHandler(org.bukkit.plugin.Plugin plugin)
          Returns the registered ExceptionHandler for a Plugin.
static java.util.List<ExceptionHandler> getExceptionHandlers()
          Returns all registered ExceptionHandlers.
static org.bukkit.plugin.Plugin getPlugin()
          Returns the current Plugin.
 void onDisable()
          This method is called when the plugin gets disabled.
 void onEnable()
          This method is called when the plugin gets enabled.
 void onLoad()
          This method is called when the plugin loads.
static void removeExceptionHandler(org.bukkit.plugin.Plugin plugin)
          Unregisters the ExceptionHandler of a binding Plugin.
static void setExceptionHandler(ExceptionHandler exceptionHandler)
          Registers the ExceptionHandler for a binding Plugin.
 java.lang.String toString()
           
 
Methods inherited from class org.bukkit.plugin.java.JavaPlugin
getClassLoader, getCommand, getDatabase, getDatabaseClasses, getDataFolder, getDefaultWorldGenerator, getDescription, getFile, getLogger, getPluginLoader, getResource, getServer, initialize, installDDL, isEnabled, isInitialized, isNaggable, onCommand, onTabComplete, reloadConfig, removeDDL, saveConfig, saveDefaultConfig, saveResource, setEnabled, setNaggable
 
Methods inherited from class org.bukkit.plugin.PluginBase
equals, getName, hashCode
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

QuarterBukkit

public QuarterBukkit()
The default constructor for Bukkit.

Method Detail

getPlugin

public static org.bukkit.plugin.Plugin getPlugin()
Returns the current Plugin.

Returns:
The current Plugin.

getExceptionHandlers

public static java.util.List<ExceptionHandler> getExceptionHandlers()
Returns all registered ExceptionHandlers.

Returns:
The ExceptionHandlers.

getExceptionHandler

public static ExceptionHandler getExceptionHandler(org.bukkit.plugin.Plugin plugin)
Returns the registered ExceptionHandler for a Plugin.

Parameters:
plugin - The binding Plugin.
Returns:
The ExceptionHandler.

setExceptionHandler

public static void setExceptionHandler(ExceptionHandler exceptionHandler)
Registers the ExceptionHandler for a binding Plugin.

Parameters:
exceptionHandler - The ExceptionHandler to register.

removeExceptionHandler

public static void removeExceptionHandler(org.bukkit.plugin.Plugin plugin)
Unregisters the ExceptionHandler of a binding Plugin.

Parameters:
plugin - The Plugin to unregister.

exception

public static void exception(GameException exception)
Handles an GameException in the correct ExceptionHandler.

Parameters:
exception - The GameException to handle.

onLoad

public void onLoad()
This method is called when the plugin loads. It will initalize the most important functions. The plugin will check for new versions and updates, if required.

Specified by:
onLoad in interface org.bukkit.plugin.Plugin
Overrides:
onLoad in class org.bukkit.plugin.java.JavaPlugin

onEnable

public void onEnable()
This method is called when the plugin gets enabled. It will initalize the main API functions.

Specified by:
onEnable in interface org.bukkit.plugin.Plugin
Overrides:
onEnable in class org.bukkit.plugin.java.JavaPlugin

onDisable

public void onDisable()
This method is called when the plugin gets disabled. It will disable the enabled API functions and clear the space.

Specified by:
onDisable in interface org.bukkit.plugin.Plugin
Overrides:
onDisable in class org.bukkit.plugin.java.JavaPlugin

getConfig

public Config getConfig()
Specified by:
getConfig in interface org.bukkit.plugin.Plugin
Overrides:
getConfig in class org.bukkit.plugin.java.JavaPlugin

toString

public java.lang.String toString()
Overrides:
toString in class org.bukkit.plugin.java.JavaPlugin