public abstract class Event extends Object
服务器中可能发生的事情称作事件。定义一个需要它在一个事件发生时被运行的过程,这个过程称作监听器。
Things that happens in the server is called a event. Define a procedure that should be executed
when a event happens, this procedure is called a listener.
Nukkit调用事件的处理器时,会通过参数的类型判断需要被监听的事件。
When Nukkit is calling a handler, the event needed to listen is judged by the type of the parameter.
关于监听器的实现,参阅:Listener
For the way to implement a listener, see: Listener
EventHandler| Constructor and Description |
|---|
Event() |
| Modifier and Type | Method and Description |
|---|---|
String |
getEventName() |
boolean |
isCancelled() |
void |
setCancelled() |
void |
setCancelled(boolean value) |
Copyright © 2020. All rights reserved.