Package org.bukkit.plugin
Class TimedRegisteredListener
java.lang.Object
org.bukkit.plugin.RegisteredListener
org.bukkit.plugin.TimedRegisteredListener
Extends RegisteredListener to include timing information
- 
Constructor SummaryConstructorsConstructorDescriptionTimedRegisteredListener(@NotNull Listener pluginListener, @NotNull EventExecutor eventExecutor, @NotNull EventPriority eventPriority, @NotNull Plugin registeredPlugin, boolean listenCancelled) 
- 
Method SummaryModifier and TypeMethodDescriptionvoidCalls the event executorintgetCount()Gets the total times this listener has been calledGets the class of the events this listener handled.longGets the total time calls to this listener have takenbooleanGets whether this listener has handled multiple events, such that for some two events,eventA.getClass() != eventB.getClass().voidreset()Resets the call count and total time for this listenerMethods inherited from class org.bukkit.plugin.RegisteredListenergetExecutor, getListener, getPlugin, getPriority, isIgnoringCancelled, toString
- 
Constructor Details- 
TimedRegisteredListener
 
- 
- 
Method Details- 
callEventDescription copied from class:RegisteredListenerCalls the event executor- Overrides:
- callEventin class- RegisteredListener
- Parameters:
- event- The event
- Throws:
- EventException- If an event handler throws an exception.
 
- 
resetpublic void reset()Resets the call count and total time for this listener
- 
getCountpublic int getCount()Gets the total times this listener has been called- Returns:
- Times this listener has been called
 
- 
getTotalTimepublic long getTotalTime()Gets the total time calls to this listener have taken- Returns:
- Total time for all calls of this listener
 
- 
getEventClassGets 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 classthis.getEventClass().isAssignableFrom(clazz) && this.getEventClass() != clazz && event.getClass().isAssignableFrom(clazz)for all handled events.- Returns:
- the event class handled by this RegisteredListener
 
- 
hasMultiplepublic boolean hasMultiple()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
 
 
-