public abstract class

Resource

extends Object
java.lang.Object
   ↳ net.gtaun.shoebill.resource.Resource
Known Direct Subclasses

Summary

Public Methods
File getDataDir()
Gets the Datadir.
ResourceDescription getDescription()
Gets the ResourceDescription of the Resource
EventManager getEventManager()
Gets the event Manager.
Logger getLogger()
Gets the Logger
Shoebill getShoebill()
Gets the active Shoebill instance from the Resource.
boolean isEnabled()
Checks if the Resource is enabled.
void onDisable(Runnable runnable)
<T extends Service> void registerService(Class<T> type, T service)
Registers a Service
<T extends Service> void unregisterService(Class<T> type)
Unregisters a Service by its class
Protected Methods
void disable()
Gets called when the Resource is getting unloaded.
void enable()
Gets called when the Resource is getting enabled.
abstract void onDisable()
Gets called when the Resource is getting unloaded.
abstract void onEnable()
Gets called when the Resource is getting enabled.
[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

public File getDataDir ()

Gets the Datadir.

Returns
  • The Datadir

public ResourceDescription getDescription ()

Gets the ResourceDescription of the Resource

Returns
  • The ResourceDescription.

public EventManager getEventManager ()

Gets the event Manager.

Returns
  • The Eventmanager

public Logger getLogger ()

Gets the Logger

Returns
  • The Logger

public Shoebill getShoebill ()

Gets the active Shoebill instance from the Resource.

Returns
  • Shoebill instance.

public boolean isEnabled ()

Checks if the Resource is enabled.

Returns
  • The state of the Resource (boolean).

public void onDisable (Runnable runnable)

public void registerService (Class<T> type, T service)

Registers a Service

Parameters
type Class instance.
service The Service

public void unregisterService (Class<T> type)

Unregisters a Service by its class

Parameters
type The Class instance

Protected Methods

protected void disable ()

Gets called when the Resource is getting unloaded.

Throws
Throwable

protected void enable ()

Gets called when the Resource is getting enabled.

Throws
Throwable

protected abstract void onDisable ()

Gets called when the Resource is getting unloaded.

Throws
Throwable

protected abstract void onEnable ()

Gets called when the Resource is getting enabled.

Throws
Throwable