![]() |
Bukkit
1.4.7-R1.0
|
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 |
Holds information for player movement events.
Definition at line 11 of file PlayerMoveEvent.java.
| org.bukkit.event.player.PlayerMoveEvent.PlayerMoveEvent | ( | final Player | player, |
| final Location | from, | ||
| final Location | to | ||
| ) |
Definition at line 17 of file PlayerMoveEvent.java.
| Location org.bukkit.event.player.PlayerMoveEvent.getFrom | ( | ) |
Gets the location this player moved from.
Definition at line 56 of file PlayerMoveEvent.java.
|
static |
Definition at line 92 of file PlayerMoveEvent.java.
|
virtual |
Implements org.bukkit.event.Event.
Reimplemented in org.bukkit.event.player.PlayerTeleportEvent, and org.bukkit.event.player.PlayerPortalEvent.
Definition at line 88 of file PlayerMoveEvent.java.
| Location org.bukkit.event.player.PlayerMoveEvent.getTo | ( | ) |
Gets the location this 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
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
| cancel | true 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.
| from | New 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.
| to | New Location this player will move to |
Definition at line 83 of file PlayerMoveEvent.java.