public class PlayerMoveEvent extends PlayerEvent implements Cancellable
Event.Result
player
构造器和说明 |
---|
PlayerMoveEvent(Player player,
Location from,
Location to) |
限定符和类型 | 方法和说明 |
---|---|
Location |
getFrom()
得到玩家移动到此位置之前的位置.
|
static HandlerList |
getHandlerList() |
HandlerList |
getHandlers() |
Location |
getTo()
得到玩家移动到的位置.
|
boolean |
isCancelled()
获取此事件的取消状态.
|
void |
setCancelled(boolean cancel)
设置取消状态的事件。
|
void |
setFrom(Location from)
设置玩家将要移动到此位置之前的位置.
|
void |
setTo(Location to)
设置玩家将要移动的位置.
|
getPlayer
getEventName, isAsynchronous
public boolean isCancelled()
如果一个移动或传送事件被取消,玩家将被移动或传送回getFrom()定义的位置。这不会触发此事件.
原文:Gets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins
If a move or teleport event is cancelled, the player will be moved or teleported back to the Location as defined by getFrom(). This will not fire an event
isCancelled
在接口中 Cancellable
public void setCancelled(boolean cancel)
如果一个移动或传送事件被取消,玩家将被移动或传送回getFrom()定义的位置。这不会触发此事件.
原文:Sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins
If a move or teleport event is cancelled, the player will be moved or teleported back to the Location as defined by getFrom(). This will not fire an event
setCancelled
在接口中 Cancellable
cancel
- 是否取消这个事件public Location getFrom()
原文:Gets the location this player moved from
public void setFrom(Location from)
原文:Sets the location to mark as where the player moved from
from
- 记录玩家移动之前的位置public Location getTo()
原文:Gets the location this player moved to
public void setTo(Location to)
原文:Sets the location that this player will move to
to
- 玩家将要移动到的位置public HandlerList getHandlers()
getHandlers
在类中 Event
public static HandlerList getHandlerList()