summaryrefslogtreecommitdiffstats
path: root/src/main/java/org/bukkit/event/player/PlayerVelocityEvent.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/org/bukkit/event/player/PlayerVelocityEvent.java')
-rw-r--r--src/main/java/org/bukkit/event/player/PlayerVelocityEvent.java119
1 files changed, 55 insertions, 64 deletions
diff --git a/src/main/java/org/bukkit/event/player/PlayerVelocityEvent.java b/src/main/java/org/bukkit/event/player/PlayerVelocityEvent.java
index 14cd0e95..69d2fce4 100644
--- a/src/main/java/org/bukkit/event/player/PlayerVelocityEvent.java
+++ b/src/main/java/org/bukkit/event/player/PlayerVelocityEvent.java
@@ -1,64 +1,55 @@
-package org.bukkit.event.player;
-
-import org.bukkit.entity.Player;
-import org.bukkit.event.Cancellable;
-import org.bukkit.event.HandlerList;
-import org.bukkit.util.Vector;
-
-public class PlayerVelocityEvent extends PlayerEvent implements Cancellable {
- private static final HandlerList handlers = new HandlerList();
- private boolean cancel = false;
- private Vector velocity;
-
- public PlayerVelocityEvent(final Player player, final Vector velocity) {
- super(player);
- this.velocity = velocity;
- }
-
- /**
- * Gets the cancellation state of this event. A cancelled event will not
- * be executed in the server, but will still pass to other plugins
- *
- * @return true if this event is cancelled
- */
- public boolean isCancelled() {
- return 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
- *
- * @param cancel true if you wish to cancel this event
- */
- public void setCancelled(boolean cancel) {
- this.cancel = cancel;
- }
-
- /**
- * Gets the velocity vector that will be sent to the player
- *
- * @return Vector the player will get
- */
- public Vector getVelocity() {
- return velocity;
- }
-
- /**
- * Sets the velocity vector that will be sent to the player
- *
- * @param velocity The velocity vector that will be sent to the player
- */
- public void setVelocity(Vector velocity) {
- this.velocity = velocity;
- }
-
- @Override
- public HandlerList getHandlers() {
- return handlers;
- }
-
- public static HandlerList getHandlerList() {
- return handlers;
- }
-}
+package org.bukkit.event.player;
+
+import org.bukkit.entity.Player;
+import org.bukkit.event.Cancellable;
+import org.bukkit.event.HandlerList;
+import org.bukkit.util.Vector;
+
+/**
+ * Called when the velocity of a player changes.
+ */
+public class PlayerVelocityEvent extends PlayerEvent implements Cancellable {
+ private static final HandlerList handlers = new HandlerList();
+ private boolean cancel = false;
+ private Vector velocity;
+
+ public PlayerVelocityEvent(final Player player, final Vector velocity) {
+ super(player);
+ this.velocity = velocity;
+ }
+
+ public boolean isCancelled() {
+ return cancel;
+ }
+
+ public void setCancelled(boolean cancel) {
+ this.cancel = cancel;
+ }
+
+ /**
+ * Gets the velocity vector that will be sent to the player
+ *
+ * @return Vector the player will get
+ */
+ public Vector getVelocity() {
+ return velocity;
+ }
+
+ /**
+ * Sets the velocity vector that will be sent to the player
+ *
+ * @param velocity The velocity vector that will be sent to the player
+ */
+ public void setVelocity(Vector velocity) {
+ this.velocity = velocity;
+ }
+
+ @Override
+ public HandlerList getHandlers() {
+ return handlers;
+ }
+
+ public static HandlerList getHandlerList() {
+ return handlers;
+ }
+}