mirror of
https://github.com/PaperMC/Paper.git
synced 2025-02-08 08:31:51 +01:00
Added Player set/getAllowFlight methods. Thanks to Qala for the PR.
By: Nathan Adams <dinnerbone@dinnerbone.com>
This commit is contained in:
parent
8670d01e58
commit
768732a914
@ -471,4 +471,19 @@ public interface Player extends HumanEntity, CommandSender, OfflinePlayer, Plugi
|
|||||||
* @return Bed Spawn Location if bed exists, otherwise null.
|
* @return Bed Spawn Location if bed exists, otherwise null.
|
||||||
*/
|
*/
|
||||||
public Location getBedSpawnLocation();
|
public Location getBedSpawnLocation();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determines if the Player is allowed to fly via jump key double-tap like in creative mode.
|
||||||
|
*
|
||||||
|
* @return True if the player is allowed to fly.
|
||||||
|
*/
|
||||||
|
public boolean getAllowFlight();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets if the Player is allowed to fly via jump key double-tap like in creative mode.
|
||||||
|
*
|
||||||
|
* @param flight If flight should be allowed.
|
||||||
|
*/
|
||||||
|
public void setAllowFlight(boolean flight);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -597,4 +597,12 @@ public class TestPlayer implements Player {
|
|||||||
public void playEffect(EntityEffect type) {
|
public void playEffect(EntityEffect type) {
|
||||||
throw new UnsupportedOperationException("Not supported yet.");
|
throw new UnsupportedOperationException("Not supported yet.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean getAllowFlight() {
|
||||||
|
throw new UnsupportedOperationException("Not supported yet.");
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAllowFlight(boolean flight) {
|
||||||
|
throw new UnsupportedOperationException("Not supported yet.");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user