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
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 -
Method Summary
Modifier and TypeMethodDescriptionvoidregister()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.voidUnregisters the listener from thepluginMethods inherited from class xyz.srnyx.annoyingapi.parents.Registrable
isRegistered, setRegisteredMethods inherited from class xyz.srnyx.javautilities.parents.Stringable
toString, toString, toString, toString, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface xyz.srnyx.annoyingapi.parents.Annoyable
getAnnoyingPlugin
-
Constructor Details
-
AnnoyingListener
public AnnoyingListener()Constructs a new listener instance for registration
-
-
Method Details
-
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
-