Package xyz.srnyx.annoyingapi
Class AnnoyingListener
- java.lang.Object
-
- xyz.srnyx.javautilities.parents.Stringable
-
- xyz.srnyx.annoyingapi.parents.Registrable
-
- xyz.srnyx.annoyingapi.AnnoyingListener
-
- All Implemented Interfaces:
org.bukkit.event.Listener,Annoyable
- Direct Known Subclasses:
CustomEventHandler
public abstract class AnnoyingListener extends Registrable implements org.bukkit.event.Listener
A listener that can be registered to the Bukkit event system
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class xyz.srnyx.annoyingapi.parents.Registrable
Registrable.Ignore
-
-
Constructor Summary
Constructors Constructor Description AnnoyingListener()Constructs a new listener instance for registration
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidregister()Registers the listener to theplugin
If the listener contains any custom events from Annoying API (such asAdvancedPlayerMoveEvent), those events' respective listener handlers will be registered as well.voidunregister()Unregisters the listener from theplugin-
Methods inherited from class xyz.srnyx.annoyingapi.parents.Registrable
isRegistered, setRegistered
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface xyz.srnyx.annoyingapi.parents.Annoyable
getAnnoyingPlugin
-
-
-
-
Method Detail
-
register
public void register()
Registers the listener to theplugin
If the listener contains any custom events from Annoying API (such asAdvancedPlayerMoveEvent), those events' respective listener handlers will be registered as well.
It will only attempt to register those custom events once (when it's first registered), if this listener is unregistered and registered again, it will not attempt to register the custom events again.- Overrides:
registerin classRegistrable
-
unregister
public void unregister()
Unregisters the listener from theplugin- Overrides:
unregisterin classRegistrable
-
-