diff options
author | Nathan Adams <dinnerbone@dinnerbone.com> | 2012-01-15 10:55:05 +0000 |
---|---|---|
committer | Nathan Adams <dinnerbone@dinnerbone.com> | 2012-01-15 10:56:09 +0000 |
commit | a753ee587d60d5c315a662a19643225b7b796457 (patch) | |
tree | 7e0aebb0b2c5bc24d3f7ab3b30ceae85c9eb4024 | |
parent | 6d49b113380e10e4b9b38f2bd2ee8db29c35acaa (diff) | |
download | craftbukkit-a753ee587d60d5c315a662a19643225b7b796457.tar craftbukkit-a753ee587d60d5c315a662a19643225b7b796457.tar.gz craftbukkit-a753ee587d60d5c315a662a19643225b7b796457.tar.lz craftbukkit-a753ee587d60d5c315a662a19643225b7b796457.tar.xz craftbukkit-a753ee587d60d5c315a662a19643225b7b796457.zip |
Implemented allowFlight methods. Thanks to Qala for the PR.
-rw-r--r-- | src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java index c86c8720..17307511 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -538,6 +538,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player { getHandle().getFoodData().foodLevel = value; } + public boolean getAllowFlight() { + return getHandle().itemInWorldManager.player.abilities.canFly; + } + + public void setAllowFlight(boolean flight) { + getHandle().itemInWorldManager.player.abilities.canFly = flight; + } + public Location getBedSpawnLocation() { World world = getServer().getWorld(getHandle().spawnWorld); if ((world != null) && (getHandle().getBed() != null)) { |