T
- The specific Plugin
to usepublic abstract class SubListener<T extends Plugin> extends Object implements Listener
Listener
class (and
even implements said interface), however it also provides methods for simpler
registration as well as a simple constructor to ensure a plugin instance is
availableModifier and Type | Field and Description |
---|---|
protected T |
plugin
The stored
Plugin reference relevant to this SubListener |
Constructor and Description |
---|
SubListener(T plugin)
Stores the
Plugin reference |
Modifier and Type | Method and Description |
---|---|
T |
getPlugin()
Returns the
Plugin used for this SubListener |
void |
onDisable()
Called when the plugin is being disabled.
|
void |
register()
Registers the listener to the
ListenerManager . |
protected final T extends Plugin plugin
Plugin
reference relevant to this SubListener
public SubListener(T plugin)
Plugin
referenceplugin
- The Plugin
relevant to this SubListener
public void onDisable()
public T getPlugin()
Plugin
used for this SubListener
Plugin
that registered this SubListener
public final void register()
ListenerManager
. If the listener
class is already registered, this method will do nothing.Copyright © 2017. All rights reserved.