Implemented allowFlight methods. Thanks to Qala for the PR.
By: Nathan Adams <dinnerbone@dinnerbone.com>
This commit is contained in:
parent
5b97177cd4
commit
fd9c7e7c07
1 changed files with 8 additions and 0 deletions
|
@ -538,6 +538,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||||
getHandle().getFoodData().foodLevel = value;
|
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() {
|
public Location getBedSpawnLocation() {
|
||||||
World world = getServer().getWorld(getHandle().spawnWorld);
|
World world = getServer().getWorld(getHandle().spawnWorld);
|
||||||
if ((world != null) && (getHandle().getBed() != null)) {
|
if ((world != null) && (getHandle().getBed() != null)) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue