程序包 org.bukkit.plugin

# 类 TimedRegisteredListener

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

public class TimedRegisteredListener extends RegisteredListener
Extends RegisteredListener to include timing information

- ## 构造器概要

  构造器
  构造器
  说明
  `TimedRegisteredListener(@NotNull Listener pluginListener, @NotNull EventExecutor eventExecutor, @NotNull EventPriority eventPriority, @NotNull Plugin registeredPlugin, boolean listenCancelled)`

- ## 方法概要

  修饰符和类型
  方法
  说明
  `void`
  `callEvent(@NotNull Event event)`
  Calls the event executor
  `int`
  `getCount()`
  Gets the total times this listener has been called
  `@Nullable Class<? extends Event>`
  `getEventClass()`
  Gets the class of the events this listener handled.
  `long`
  `getTotalTime()`
  Gets the total time calls to this listener have taken
  `boolean`
  `hasMultiple()`
  Gets whether this listener has handled multiple events, such that for some two events, `eventA.getClass() !`
  `void`
  `reset()`
  Resets the call count and total time for this listener

  ### 从类继承的方法 org.bukkit.plugin.RegisteredListener

  `getListener, getPlugin, getPriority, isIgnoringCancelled`

  ### 从类继承的方法 java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## 构造器详细资料

  - ### TimedRegisteredListener

    public TimedRegisteredListener(@NotNull @NotNull Listener pluginListener, @NotNull @NotNull EventExecutor eventExecutor, @NotNull @NotNull EventPriority eventPriority, @NotNull @NotNull Plugin registeredPlugin, boolean listenCancelled)

- ## 方法详细资料

  - ### callEvent

    public void callEvent(@NotNull @NotNull Event event) throws EventException
    从类复制的说明: `RegisteredListener`
    Calls the event executor
    覆盖:
      `callEvent` 在类中 `RegisteredListener`
    参数:
      `event` - The event
    抛出:
      `EventException` - If an event handler throws an exception.

  - ### reset

    public void reset()
    Resets the call count and total time for this listener

  - ### getCount

    public int getCount()
    Gets the total times this listener has been called
    返回:
      Times this listener has been called

  - ### getTotalTime

    public long getTotalTime()
    Gets the total time calls to this listener have taken
    返回:
      Total time for all calls of this listener

  - ### getEventClass

    @Nullable public @Nullable Class<? extends Event> getEventClass()
    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.
    返回:
      the event class handled by this RegisteredListener

  - ### hasMultiple

    public boolean hasMultiple()
    Gets whether this listener has handled multiple events, such that for some two events, `eventA.getClass() != eventB.getClass()`.
    返回:
      true if this listener has handled multiple events