diff options
author | Wesley Wolfe <weswolf@aol.com> | 2012-08-10 00:19:21 -0500 |
---|---|---|
committer | Wesley Wolfe <weswolf@aol.com> | 2012-08-10 00:19:21 -0500 |
commit | c72b55f12e319124cf2d93be54413e4465929a82 (patch) | |
tree | b7363a59a4725714101f929a12cd04eef7453a8c | |
parent | ed84ec46ed8739fb60658b188e17941d002aff9a (diff) | |
download | bukkit-c72b55f12e319124cf2d93be54413e4465929a82.tar bukkit-c72b55f12e319124cf2d93be54413e4465929a82.tar.gz bukkit-c72b55f12e319124cf2d93be54413e4465929a82.tar.lz bukkit-c72b55f12e319124cf2d93be54413e4465929a82.tar.xz bukkit-c72b55f12e319124cf2d93be54413e4465929a82.zip |
Add API to set and get movement modifiers. Addresses BUKKIT-2205
-rw-r--r-- | src/main/java/org/bukkit/entity/Player.java | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java index 784e6896..1b2817d6 100644 --- a/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java @@ -514,4 +514,30 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline * @param value True to fly. */ public void setFlying(boolean value); + + /** + * Sets the speed at which a client will fly. Negative values indicate reverse directions. + * @param value The new speed, from -1 to 1. + * @throws IllegalArgumentException If new speed is less than -1 or greater than 1 + */ + public void setFlySpeed(float value) throws IllegalArgumentException; + + /** + * Sets the speed at which a client will walk. Negative values indicate reverse directions. + * @param value The new speed, from -1 to 1. + * @throws IllegalArgumentException If new speed is less than -1 or greater than 1 + */ + public void setWalkSpeed(float value) throws IllegalArgumentException; + + /** + * Gets the current allowed speed that a client can fly. + * @return The current allowed speed, from -1 to 1 + */ + public float getFlySpeed(); + + /** + * Gets the current allowed speed that a client can walk. + * @return The current allowed speed, from -1 to 1 + */ + public float getWalkSpeed(); } |