Package com.loohp.limbo.events.player
Class PlayerMoveEvent
java.lang.Object
com.loohp.limbo.events.Event
com.loohp.limbo.events.player.PlayerEvent
com.loohp.limbo.events.player.PlayerMoveEvent
- All Implemented Interfaces:
Cancellable
- Direct Known Subclasses:
PlayerTeleportEvent
Holds information for player movement events
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetFrom()
Gets the location this player moved fromgetTo()
Gets the location this player moved toboolean
Gets the cancellation state of this event.void
setCancelled
(boolean cancel) Sets the cancellation state of this event.void
Sets the location to mark as where the player moved fromvoid
Sets the location that this player will move toMethods inherited from class com.loohp.limbo.events.player.PlayerEvent
getPlayer
-
Constructor Details
-
PlayerMoveEvent
-
-
Method Details
-
isCancelled
public 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:
isCancelled
in interfaceCancellable
- Returns:
- true if this event is cancelled
-
setCancelled
public 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:
setCancelled
in interfaceCancellable
- Parameters:
cancel
- true if you wish to cancel this event
-
getFrom
Gets the location this player moved from- Returns:
- Location the player moved from
-
setFrom
Sets the location to mark as where the player moved from- Parameters:
from
- New location to mark as the players previous location
-
getTo
Gets the location this player moved to- Returns:
- Location the player moved to
-
setTo
Sets the location that this player will move to- Parameters:
to
- New Location this player will move to
-