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 |
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(java.lang.String channel)
Gets values from the SubServers Lang
|
java.lang.String |
getLang(java.lang.String channel,
java.lang.String key)
Gets a value from the SubServers Lang
|
java.util.Collection<java.lang.String> |
getLangChannels()
Gets the current SubServers Lang Channels
|
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,
java.lang.Object... 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(SubPluginInfo plugin,
java.lang.Runnable run,
java.util.concurrent.TimeUnit unit,
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 java.util.UUID schedule(SubPluginInfo plugin, java.lang.Runnable run, java.util.concurrent.TimeUnit unit, long delay, long repeat)
plugin
- Plugin Schedulingrun
- What to Rununit
- TimeUnit to usedelay
- Task Delayrepeat
- Task Repeat Intervalpublic void cancelTask(java.util.UUID sid)
sid
- Task IDpublic void removeListener(SubPluginInfo plugin, java.lang.Object... listeners)
plugin
- PluginInfolisteners
- Listenerspublic void executeEvent(Event event)
event
- SubEventpublic java.util.Collection<java.lang.String> getLangChannels()
public java.util.Map<java.lang.String,java.lang.String> getLang(java.lang.String channel)
channel
- Lang Channelpublic java.lang.String getLang(java.lang.String channel, java.lang.String key)
channel
- Lang Channelkey
- Keypublic UniversalFile getRuntimeDirectory()
public Version getBetaVersion()
public Version getAppVersion()