Class TimedRegisteredListener

java.lang.Object
org.bukkit.plugin.RegisteredListener
org.bukkit.plugin.TimedRegisteredListener

@Deprecated(forRemoval=true) public class TimedRegisteredListener extends RegisteredListener
Deprecated, for removal: This API element is subject to removal in a future version.
This class was part of Timings v1 and has gone unused for over a decade, timings will be removed in the future.
Extends RegisteredListener to include timing information.
  • Constructor Summary

    Constructors
    Constructor
    Description
    TimedRegisteredListener(@NotNull Listener pluginListener, @NotNull EventExecutor eventExecutor, @NotNull EventPriority eventPriority, @NotNull Plugin registeredPlugin, boolean listenCancelled)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Deprecated, for removal: This API element is subject to removal in a future version.
    Calls the event executor
    int
    Deprecated, for removal: This API element is subject to removal in a future version.
    Gets the total times this listener has been called
    @Nullable Class<? extends Event>
    Deprecated, for removal: This API element is subject to removal in a future version.
    Gets the class of the events this listener handled.
    long
    Deprecated, for removal: This API element is subject to removal in a future version.
    Gets the total time calls to this listener have taken
    boolean
    Deprecated, for removal: This API element is subject to removal in a future version.
    Gets whether this listener has handled multiple events, such that for some two events, eventA.getClass() != eventB.getClass().
    void
    Deprecated, for removal: This API element is subject to removal in a future version.
    Resets the call count and total time for this listener

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

  • Method Details

    • callEvent

      public void callEvent(@NotNull @NotNull Event event) throws EventException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from class: RegisteredListener
      Calls the event executor
      Overrides:
      callEvent in class RegisteredListener
      Parameters:
      event - The event
      Throws:
      EventException - If an event handler throws an exception.
    • reset

      public void reset()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Resets the call count and total time for this listener
    • getCount

      public int getCount()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Gets the total times this listener has been called
      Returns:
      Times this listener has been called
    • getTotalTime

      public long getTotalTime()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Gets the total time calls to this listener have taken
      Returns:
      Total time for all calls of this listener
    • getEventClass

      @Nullable public @Nullable Class<? extends Event> getEventClass()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Gets the class of the events this listener handled. If it handled multiple classes of event, the closest shared superclass will be returned, such that for any event this listener has handled, this.getEventClass().isAssignableFrom(event.getClass()) and no class this.getEventClass().isAssignableFrom(clazz) && this.getEventClass() != clazz && event.getClass().isAssignableFrom(clazz) for all handled events.
      Returns:
      the event class handled by this RegisteredListener
    • hasMultiple

      public boolean hasMultiple()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Gets whether this listener has handled multiple events, such that for some two events, eventA.getClass() != eventB.getClass().
      Returns:
      true if this listener has handled multiple events