mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-09 04:09:54 +01:00
Implemented allowFlight methods. Thanks to Qala for the PR.
This commit is contained in:
parent
6d49b11338
commit
a753ee587d
@ -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)) {
|
||||
|
Loading…
Reference in New Issue
Block a user