Bukkit  1.4.7-R1.0
 All Classes Namespaces Files Functions Variables Enumerator Pages
org.bukkit.event.player.PlayerMoveEvent Class Reference

Holds information for player movement events. More...

+ Inheritance diagram for org.bukkit.event.player.PlayerMoveEvent:
+ Collaboration diagram for org.bukkit.event.player.PlayerMoveEvent:

Public Member Functions

 PlayerMoveEvent (final Player player, final Location from, final Location to)
 
boolean isCancelled ()
 Gets the cancellation state of this event.
 
void setCancelled (boolean cancel)
 Sets the cancellation state of this event.
 
Location getFrom ()
 Gets the location this player moved from.
 
void setFrom (Location from)
 Sets the location to mark as where the player moved from.
 
Location getTo ()
 Gets the location this player moved to.
 
void setTo (Location to)
 Sets the location that this player will move to.
 
HandlerList getHandlers ()
 
- Public Member Functions inherited from org.bukkit.event.player.PlayerEvent
 PlayerEvent (final Player who)
 
final Player getPlayer ()
 Returns the player involved in this event.
 
- Public Member Functions inherited from org.bukkit.event.Event
 Event ()
 The default constructor is defined for cleaner code.
 
 Event (boolean isAsync)
 This constructor is used to explicitly declare an event as synchronous or asynchronous.
 
String getEventName ()
 
final boolean isAsynchronous ()
 Any custom event that should not by synchronized with other events must use the specific constructor.
 
- Public Member Functions inherited from org.bukkit.event.Cancellable
boolean isCancelled ()
 Gets the cancellation state of this event.
 
void setCancelled (boolean cancel)
 Sets the cancellation state of this event.
 

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.

Constructor & Destructor Documentation

org.bukkit.event.player.PlayerMoveEvent.PlayerMoveEvent ( final Player  player,
final Location  from,
final Location  to 
)

Definition at line 17 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.

static HandlerList org.bukkit.event.player.PlayerMoveEvent.getHandlerList ( )
static

Definition at line 92 of file PlayerMoveEvent.java.

HandlerList org.bukkit.event.player.PlayerMoveEvent.getHandlers ( )
virtual
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.

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

Definition at line 33 of file PlayerMoveEvent.java.

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

Definition at line 47 of file PlayerMoveEvent.java.

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.

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.


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