public final class SubAPI
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
void |
addCommand(Command command,
java.lang.String... handles)
Registers a Command
|
void |
addListener(SubPluginInfo plugin,
Listener... listeners)
Register SubEvent Listeners
|
void |
cancelTask(java.util.UUID sid)
Cancel a task
|
void |
executeEvent(Event event)
Run a SubEvent
|
Version |
getAppVersion()
Gets the SubServers Version
|
Version |
getBetaVersion()
Gets the SubServers Beta Version
|
static SubAPI |
getInstance()
Gets the SubAPI Methods
|
ExHost |
getInternals()
Deprecated.
Use SubAPI Methods when available
|
java.util.Map<java.lang.String,java.lang.String> |
getLang()
Gets the SubServers Lang
|
java.lang.String |
getLang(java.lang.String key)
Gets a value from the SubServers Lang
|
SubPluginInfo |
getPlugin(java.lang.String plugin)
Gets a Plugin
|
java.util.Map<java.lang.String,SubPluginInfo> |
getPlugins()
Get a map of the Plugins
|
UniversalFile |
getRuntimeDirectory()
Gets the Runtime Directory
|
SubDataClient |
getSubDataNetwork()
Gets the SubData Network Manager
|
void |
removeCommand(java.lang.String... handles)
Unregisters a Command
|
void |
removeListener(SubPluginInfo plugin,
Listener... listeners)
Unregister SubEvent Listeners
|
java.util.UUID |
schedule(SubPluginInfo plugin,
java.lang.Runnable run)
Schedule a task
|
java.util.UUID |
schedule(SubPluginInfo plugin,
java.lang.Runnable run,
long delay)
Schedule a task
|
java.util.UUID |
schedule(SubPluginInfo plugin,
java.lang.Runnable run,
long delay,
long repeat)
Schedule a task
|
java.util.UUID |
schedule(SubTask builder)
Schedule a task
|
public static SubAPI getInstance()
@Deprecated public ExHost getInternals()
public SubDataClient getSubDataNetwork()
public java.util.Map<java.lang.String,SubPluginInfo> getPlugins()
public SubPluginInfo getPlugin(java.lang.String plugin)
plugin
- Plugin Namepublic void addCommand(Command command, java.lang.String... handles)
command
- Commandhandles
- Aliasespublic void removeCommand(java.lang.String... handles)
handles
- Aliasespublic java.util.UUID schedule(SubTask builder)
builder
- SubTaskBuilderpublic java.util.UUID schedule(SubPluginInfo plugin, java.lang.Runnable run)
plugin
- Plugin Schedulingrun
- What to runpublic java.util.UUID schedule(SubPluginInfo plugin, java.lang.Runnable run, long delay)
plugin
- Plugin Schedulingrun
- What to Rundelay
- Task Delaypublic java.util.UUID schedule(SubPluginInfo plugin, java.lang.Runnable run, long delay, long repeat)
plugin
- Plugin Schedulingrun
- What to Rundelay
- Task Delayrepeat
- Task Repeat Intervalpublic void cancelTask(java.util.UUID sid)
sid
- Task IDpublic void addListener(SubPluginInfo plugin, Listener... listeners)
plugin
- PluginInfolisteners
- Listenerspublic void removeListener(SubPluginInfo plugin, Listener... listeners)
plugin
- PluginInfolisteners
- Listenerspublic void executeEvent(Event event)
event
- SubEventpublic java.lang.String getLang(java.lang.String key)
key
- Keypublic java.util.Map<java.lang.String,java.lang.String> getLang()
public UniversalFile getRuntimeDirectory()
public Version getBetaVersion()
public Version getAppVersion()