diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java index c86c8720ea..1730751171 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)) {