Bukkit-API  1.7.9-R0.2
The inofficial Bukkit-API
org.bukkit.event.player.PlayerMoveEvent Class Reference
Inheritance diagram for org.bukkit.event.player.PlayerMoveEvent:
org.bukkit.event.player.PlayerEvent org.bukkit.event.Cancellable org.bukkit.event.Event org.bukkit.event.player.PlayerTeleportEvent org.bukkit.event.player.PlayerPortalEvent

Public Member Functions

 PlayerMoveEvent (final Player player, final Location from, final Location to)
 
boolean isCancelled ()
 
void setCancelled (boolean cancel)
 
Location getFrom ()
 
void setFrom (Location from)
 
Location getTo ()
 
void setTo (Location to)
 
HandlerList getHandlers ()
 
- Public Member Functions inherited from org.bukkit.event.player.PlayerEvent
 PlayerEvent (final Player who)
 
final Player getPlayer ()
 
- Public Member Functions inherited from org.bukkit.event.Event
 Event ()
 
 Event (boolean isAsync)
 
String getEventName ()
 
abstract HandlerList getHandlers ()
 
final boolean isAsynchronous ()
 

Static Public Member Functions

static HandlerList getHandlerList ()
 

Additional Inherited Members

- Protected Attributes inherited from org.bukkit.event.player.PlayerEvent
Player player
 

Detailed Description

Holds information for player movement events

Definition at line 11 of file PlayerMoveEvent.java.

Member Function Documentation

Location org.bukkit.event.player.PlayerMoveEvent.getFrom ( )

Gets the location this player moved from

Returns
Location the player moved from

Definition at line 56 of file PlayerMoveEvent.java.

56  {
57  return from;
58  }
Location org.bukkit.event.player.PlayerMoveEvent.getTo ( )

Gets the location this player moved to

Returns
Location the player moved to

Definition at line 74 of file PlayerMoveEvent.java.

74  {
75  return to;
76  }
boolean org.bukkit.event.player.PlayerMoveEvent.isCancelled ( )

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

Returns
true if this event is cancelled

Implements org.bukkit.event.Cancellable.

Definition at line 33 of file PlayerMoveEvent.java.

33  {
34  return cancel;
35  }
void org.bukkit.event.player.PlayerMoveEvent.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 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

Parameters
canceltrue if you wish to cancel this event

Implements org.bukkit.event.Cancellable.

Definition at line 47 of file PlayerMoveEvent.java.

47  {
48  this.cancel = cancel;
49  }
void org.bukkit.event.player.PlayerMoveEvent.setFrom ( Location  from)

Sets the location to mark as where the player moved from

Parameters
fromNew location to mark as the players previous location

Definition at line 65 of file PlayerMoveEvent.java.

65  {
66  this.from = from;
67  }
void org.bukkit.event.player.PlayerMoveEvent.setTo ( Location  to)

Sets the location that this player will move to

Parameters
toNew Location this player will move to

Definition at line 83 of file PlayerMoveEvent.java.

83  {
84  this.to = to;
85  }

The documentation for this class was generated from the following file: