|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.cliffblaster.game.api.JavaPlugin
public abstract class JavaPlugin
Constructor Summary | |
---|---|
JavaPlugin()
|
Method Summary | |
---|---|
abstract void |
destroy()
Called when the plug-in is supposed to be unloaded by the PluginManager |
PluginManager |
getManager()
Returns the PluginManager |
java.io.File |
getPluginDirectory()
Returns the directory for the plugin's configuration files. |
Server |
getServer()
returns the PluginManager 's MinecraftServer instance |
abstract void |
init()
Called when the plug-in is first initialized by the PluginManager |
Command |
registerCommand(java.lang.String title,
Command executor,
boolean replace)
Registers a command executor to a command title Plug-ins are required to use registerCommand, unlike in the precious API Returns an old Command or the passed in executor if succeeded, null if failed. |
RegisteredEvent |
registerEvent(Event.Type type,
EventListener listener,
Event.Priority priority)
Registers an event that the plug-in will listen to and returns a RegisteredEvent object. |
void |
unregisterEvent(RegisteredEvent event)
Unregisters a RegisteredEvent from the event list and returns true if event was registered. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JavaPlugin()
Method Detail |
---|
public final PluginManager getManager()
PluginManager
public final Server getServer()
PluginManager
's MinecraftServer
instance
public final java.io.File getPluginDirectory()
public final Command registerCommand(java.lang.String title, Command executor, boolean replace)
Command
or the passed in executor if succeeded, null if failed.
public final RegisteredEvent registerEvent(Event.Type type, EventListener listener, Event.Priority priority)
RegisteredEvent
object.
Priorities are the order in which an event will be called upon occurring.
public final void unregisterEvent(RegisteredEvent event)
RegisteredEvent
from the event list and returns true if event was registered.
public abstract void init()
PluginManager
public abstract void destroy()
PluginManager
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |