Package org.bukkit.event.player
Class PlayerMoveEvent
java.lang.Object
org.bukkit.event.Event
org.bukkit.event.player.PlayerEvent
org.bukkit.event.player.PlayerMoveEvent
- All Implemented Interfaces:
- Cancellable
- Direct Known Subclasses:
- PlayerTeleportEvent
Holds information for player movement events
- 
Nested Class SummaryNested classes/interfaces inherited from class org.bukkit.event.EventEvent.Result
- 
Field SummaryFields inherited from class org.bukkit.event.player.PlayerEventplayer
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptiongetFrom()Gets the location this player moved fromstatic HandlerListgetTo()Gets the location this player moved tobooleanGets the cancellation state of this event.voidsetCancelled(boolean cancel) Sets the cancellation state of this event.voidSets the location to mark as where the player moved fromvoidSets the location that this player will move toMethods inherited from class org.bukkit.event.player.PlayerEventgetPlayerMethods inherited from class org.bukkit.event.EventgetEventName, isAsynchronous
- 
Constructor Details- 
PlayerMoveEvent
 
- 
- 
Method Details- 
isCancelledpublic boolean isCancelled()Gets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other pluginsIf 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 - Specified by:
- isCancelledin interface- Cancellable
- Returns:
- true if this event is cancelled
 
- 
setCancelledpublic void setCancelled(boolean cancel) Sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other pluginsIf 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 - Specified by:
- setCancelledin interface- Cancellable
- Parameters:
- cancel- true if you wish to cancel this event
 
- 
getFromGets the location this player moved from- Returns:
- Location the player moved from
 
- 
setFromSets the location to mark as where the player moved from- Parameters:
- from- New location to mark as the players previous location
 
- 
getToGets the location this player moved to- Returns:
- Location the player moved to
 
- 
setToSets the location that this player will move to- Parameters:
- to- New Location this player will move to
 
- 
getHandlers- Specified by:
- getHandlersin class- Event
 
- 
getHandlerList
 
-