public class PortalCreateEvent extends WorldEvent implements Cancellable
限定符和类型 | 类和说明 |
---|---|
static class |
PortalCreateEvent.CreateReason
指定传送门创建的各种原因的一个枚举
|
Event.Result
构造器和说明 |
---|
PortalCreateEvent(java.util.Collection<Block> blocks,
World world,
PortalCreateEvent.CreateReason reason) |
限定符和类型 | 方法和说明 |
---|---|
java.util.ArrayList<Block> |
getBlocks()
获取与创建的传送门所相关连的所有区块的数组列表.
|
static HandlerList |
getHandlerList() |
HandlerList |
getHandlers() |
PortalCreateEvent.CreateReason |
getReason()
获取这个传送门的创建理由.
|
boolean |
isCancelled()
获取这个事件是否被取消.一个被取消的事件不会在服务器里被执行,但是仍然会传递事件到其他插件。
|
void |
setCancelled(boolean cancel)
取消这个事件.
|
getWorld
getEventName, isAsynchronous
public PortalCreateEvent(java.util.Collection<Block> blocks, World world, PortalCreateEvent.CreateReason reason)
public java.util.ArrayList<Block> getBlocks()
原文: Gets an array list of all the blocks associated with the created portal
public boolean isCancelled()
Cancellable
原文:Gets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins
isCancelled
在接口中 Cancellable
public void setCancelled(boolean cancel)
Cancellable
原文:Sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.
setCancelled
在接口中 Cancellable
cancel
- 如果你想取消这个事件,则为truepublic PortalCreateEvent.CreateReason getReason()
原文: Gets the reason for the portal's creation
public HandlerList getHandlers()
getHandlers
在类中 Event
public static HandlerList getHandlerList()