diff options
author | Chad Waters <authorblues@gmail.com> | 2013-03-17 11:59:04 -0400 |
---|---|---|
committer | Travis Watkins <amaranth@ubuntu.com> | 2013-03-17 22:24:22 -0500 |
commit | 2f8f3cf4200f9518d8cae03fd7a55dc1a24c82a3 (patch) | |
tree | 422682482d44cf0f15731cfd21e063fb0936e1b6 | |
parent | 85af52675180871f2bac95ed0baedd1898517751 (diff) | |
download | bukkit-2f8f3cf4200f9518d8cae03fd7a55dc1a24c82a3.tar bukkit-2f8f3cf4200f9518d8cae03fd7a55dc1a24c82a3.tar.gz bukkit-2f8f3cf4200f9518d8cae03fd7a55dc1a24c82a3.tar.lz bukkit-2f8f3cf4200f9518d8cae03fd7a55dc1a24c82a3.tar.xz bukkit-2f8f3cf4200f9518d8cae03fd7a55dc1a24c82a3.zip |
Add Entity.isOnGround(). Adds BUKKIT-3787
-rw-r--r-- | src/main/java/org/bukkit/entity/Entity.java | 8 | ||||
-rw-r--r-- | src/main/java/org/bukkit/entity/Player.java | 11 |
2 files changed, 19 insertions, 0 deletions
diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java index 771316d8..d33f8365 100644 --- a/src/main/java/org/bukkit/entity/Entity.java +++ b/src/main/java/org/bukkit/entity/Entity.java @@ -47,6 +47,14 @@ public interface Entity extends Metadatable { public Vector getVelocity(); /** + * Returns true if the entity is supported by a block. This value is a state + * updated by the server and is not recalculated unless the entity moves. + * + * @return True if entity is on ground. + */ + public boolean isOnGround(); + + /** * Gets the current world this entity resides in * * @return World diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java index d287d78a..075db15f 100644 --- a/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java @@ -531,6 +531,17 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline public boolean canSee(Player player); /** + * Checks to see if this player is currently standing on a block. This information may + * not be reliable, as it is a state provided by the client, and may therefore not be accurate. + * + * @return True if the player standing on a solid block, else false. + * @deprecated Inconsistent with {@link org.bukkit.craftbukkit.entity.Entity#isOnGround()} + */ + @Override + @Deprecated + public boolean isOnGround(); + + /** * Checks to see if this player is currently flying or not. * * @return True if the player is flying, else false. |