Package org.bukkit.plugin
Class RegisteredListener
- java.lang.Object
-
- org.bukkit.plugin.RegisteredListener
-
- Direct Known Subclasses:
TimedRegisteredListener
public class RegisteredListener extends Object
Stores relevant information for plugin listeners
-
-
Constructor Summary
Constructors Constructor Description RegisteredListener(@NotNull Listener listener, @NotNull EventExecutor executor, @NotNull EventPriority priority, @NotNull Plugin plugin, boolean ignoreCancelled)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcallEvent(@NotNull Event event)Calls the event executor@NotNull ListenergetListener()Gets the listener for this registration@NotNull PlugingetPlugin()Gets the plugin for this registration@NotNull EventPrioritygetPriority()Gets the priority for this registrationbooleanisIgnoringCancelled()Whether this listener accepts cancelled events
-
-
-
Constructor Detail
-
RegisteredListener
public RegisteredListener(@NotNull @NotNull Listener listener, @NotNull @NotNull EventExecutor executor, @NotNull @NotNull EventPriority priority, @NotNull @NotNull Plugin plugin, boolean ignoreCancelled)
-
-
Method Detail
-
getListener
@NotNull public @NotNull Listener getListener()
Gets the listener for this registration- Returns:
- Registered Listener
-
getPlugin
@NotNull public @NotNull Plugin getPlugin()
Gets the plugin for this registration- Returns:
- Registered Plugin
-
getPriority
@NotNull public @NotNull EventPriority getPriority()
Gets the priority for this registration- Returns:
- Registered Priority
-
callEvent
public void callEvent(@NotNull @NotNull Event event) throws EventExceptionCalls the event executor- Parameters:
event- The event- Throws:
EventException- If an event handler throws an exception.
-
isIgnoringCancelled
public boolean isIgnoringCancelled()
Whether this listener accepts cancelled events- Returns:
- True when ignoring cancelled events
-
-