接口的使用
org.bukkit.event.Listener
-
org.bukkit.event中Listener的使用
修饰符和类型方法说明void
HandlerList.unregister
(Listener listener) 从这个处理列表移除一个指定的监听器。static void
HandlerList.unregisterAll
(Listener listener) 从处理器列表中注销一个指定的监听器. -
org.bukkit.plugin中Listener的使用
修饰符和类型方法说明Map<Class<? extends Event>,
Set<RegisteredListener>> PluginLoader.createRegisteredListeners
(Listener listener, Plugin plugin) Creates and returns registered listeners for the event classes used in this listenervoid
void
PluginManager.registerEvent
(Class<? extends Event> event, Listener listener, EventPriority priority, EventExecutor executor, Plugin plugin) Registers the specified executor to the given event classvoid
PluginManager.registerEvent
(Class<? extends Event> event, Listener listener, EventPriority priority, EventExecutor executor, Plugin plugin, boolean ignoreCancelled) Registers the specified executor to the given event classvoid
SimplePluginManager.registerEvent
(Class<? extends Event> event, Listener listener, EventPriority priority, EventExecutor executor, Plugin plugin) void
SimplePluginManager.registerEvent
(Class<? extends Event> event, Listener listener, EventPriority priority, EventExecutor executor, Plugin plugin, boolean ignoreCancelled) Registers the given event to the specified listener using a directly passed EventExecutorvoid
PluginManager.registerEvents
(Listener listener, Plugin plugin) Registers all the events in the given listener classvoid
SimplePluginManager.registerEvents
(Listener listener, Plugin plugin) 限定符构造器说明RegisteredListener
(Listener listener, EventExecutor executor, EventPriority priority, Plugin plugin, boolean ignoreCancelled) TimedRegisteredListener
(Listener pluginListener, EventExecutor eventExecutor, EventPriority eventPriority, Plugin registeredPlugin, boolean listenCancelled) -
org.bukkit.plugin.java中Listener的使用
修饰符和类型方法说明Map<Class<? extends Event>,
Set<RegisteredListener>> JavaPluginLoader.createRegisteredListeners
(Listener listener, Plugin plugin)