Class BukkitScriptEventListener
java.lang.Object
dev.magicmq.pyspigot.bukkit.manager.listener.BukkitScriptEventListener
- All Implemented Interfaces:
Listener
A dummy Bukkit Listener that holds an event a script is currently listening to.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionBukkitScriptEventListener(dev.magicmq.pyspigot.manager.script.Script script, PyFunction listenerFunction, Class<? extends Event> event) -
Method Summary
Modifier and TypeMethodDescriptiongetEvent()Get the Bukkit event associated with this listener.Get theBukkitScriptEventExecutorassociated with this script event listener.Get the script function that should be called when the event occurs.dev.magicmq.pyspigot.manager.script.ScriptGet the script associated with this listener.toString()Prints a representation of this BukkitScriptEventListener in string format, including the event being listened to by the listener
-
Constructor Details
-
BukkitScriptEventListener
public BukkitScriptEventListener(dev.magicmq.pyspigot.manager.script.Script script, PyFunction listenerFunction, Class<? extends Event> event) - Parameters:
script- The script listening to events within this listenerlistenerFunction- The script function that should be called when the event occursevent- The Bukkit event associated with this listener. Should be aClassof the Bukkit event
-
-
Method Details
-
getScript
public dev.magicmq.pyspigot.manager.script.Script getScript()Get the script associated with this listener.- Returns:
- The script associated with this listener.
-
getListenerFunction
Get the script function that should be called when the event occurs.- Returns:
- The script function that should be called when the event occurs
-
getEvent
Get the Bukkit event associated with this listener.Note: Because of the way scripts register events, this will be a
Classof the Bukkit event, which essentially represents its type.- Returns:
- The Bukkit event associated with this listener.
-
getEventExecutor
Get theBukkitScriptEventExecutorassociated with this script event listener.- Returns:
- The
BukkitScriptEventExecutorassociated with this script event listener
-
toString
Prints a representation of this BukkitScriptEventListener in string format, including the event being listened to by the listener
-