接口的使用
org.bukkit.event.Listener
-
org.bukkit.event中Listener的使用
修饰符和类型方法说明void
HandlerList.unregister
(@NotNull Listener listener) 从这个处理列表移除一个指定的监听器。static void
HandlerList.unregisterAll
(@NotNull Listener listener) 从处理器列表中注销一个指定的监听器. -
org.bukkit.plugin中Listener的使用
修饰符和类型方法说明PluginLoader.createRegisteredListeners
(@NotNull Listener listener, @NotNull Plugin plugin) 创建并返回给定的监听器中为对应事件类注册过的监听器.void
void
PluginManager.registerEvent
(@NotNull Class<? extends Event> event, @NotNull Listener listener, @NotNull EventPriority priority, @NotNull EventExecutor executor, @NotNull Plugin plugin) 将指定的执行器注册至指定的事件类.void
PluginManager.registerEvent
(@NotNull Class<? extends Event> event, @NotNull Listener listener, @NotNull EventPriority priority, @NotNull EventExecutor executor, @NotNull Plugin plugin, boolean ignoreCancelled) 将指定的执行器注册至指定的事件类.void
SimplePluginManager.registerEvent
(@NotNull Class<? extends Event> event, @NotNull Listener listener, @NotNull EventPriority priority, @NotNull EventExecutor executor, @NotNull Plugin plugin) void
SimplePluginManager.registerEvent
(@NotNull Class<? extends Event> event, @NotNull Listener listener, @NotNull EventPriority priority, @NotNull EventExecutor executor, @NotNull Plugin plugin, boolean ignoreCancelled) 将指定的执行器注册至指定的事件类.void
PluginManager.registerEvents
(@NotNull Listener listener, @NotNull Plugin plugin) 注册在指定监听器类中的所有事件.void
SimplePluginManager.registerEvents
(@NotNull Listener listener, @NotNull Plugin plugin) 限定符构造器说明RegisteredListener
(@NotNull Listener listener, @NotNull EventExecutor executor, @NotNull EventPriority priority, @NotNull Plugin plugin, boolean ignoreCancelled) TimedRegisteredListener
(@NotNull Listener pluginListener, @NotNull EventExecutor eventExecutor, @NotNull EventPriority eventPriority, @NotNull Plugin registeredPlugin, boolean listenCancelled) -
org.bukkit.plugin.java中Listener的使用