public class PlayerMoveEvent extends PlayerEvent implements Cancellable
Event.Result
player
コンストラクタと説明 |
---|
PlayerMoveEvent(Player player,
Location from,
Location to) |
修飾子とタイプ | メソッドと説明 |
---|---|
Location |
getFrom()
Gets the location this player moved from
|
static HandlerList |
getHandlerList() |
HandlerList |
getHandlers() |
Location |
getTo()
Gets the location this player moved to
|
boolean |
isCancelled()
Gets the cancellation state of this event.
|
void |
setCancelled(boolean cancel)
Sets the cancellation state of this event.
|
void |
setFrom(Location from)
Sets the location to mark as where the player moved from
|
void |
setTo(Location to)
Sets the location that this player will move to
|
getPlayer
getEventName, isAsynchronous
public boolean isCancelled()
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)
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
- true if you wish to cancel this eventpublic Location getFrom()
public void setFrom(Location from)
from
- New location to mark as the players previous locationpublic Location getTo()
public void setTo(Location to)
to
- New Location this player will move topublic HandlerList getHandlers()
getHandlers
クラス内 Event
public static HandlerList getHandlerList()
Copyright © 2016. All rights reserved.