Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-11-03 01:50:07 +01:00
Move isAllowedToFly and setFlying to AbstractPlayer, protect them.
Dieser Commit ist enthalten in:
Ursprung
2cc6a367c6
Commit
4ee2d3b47c
@ -187,24 +187,6 @@ public interface Player extends Entity, Actor {
|
|||||||
*/
|
*/
|
||||||
void floatAt(int x, int y, int z, boolean alwaysGlass);
|
void floatAt(int x, int y, int z, boolean alwaysGlass);
|
||||||
|
|
||||||
/**
|
|
||||||
* Check whether the player is allowed to fly.
|
|
||||||
*
|
|
||||||
* @return true if allowed flight
|
|
||||||
*/
|
|
||||||
default boolean isAllowedToFly() {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Set whether the player is currently flying.
|
|
||||||
*
|
|
||||||
* @param flying true to fly
|
|
||||||
*/
|
|
||||||
default void setFlying(boolean flying) {
|
|
||||||
throw new UnsupportedOperationException("setFlying unimplemented but isAllowedToFly was true (or unchecked)");
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the point of the block that is being stood in.
|
* Get the point of the block that is being stood in.
|
||||||
*
|
*
|
||||||
|
@ -328,6 +328,24 @@ public abstract class AbstractPlayerActor implements Actor, Player, Cloneable {
|
|||||||
setPosition(Vector3.at(x + 0.5, y, z + 0.5));
|
setPosition(Vector3.at(x + 0.5, y, z + 0.5));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check whether the player is allowed to fly.
|
||||||
|
*
|
||||||
|
* @return true if allowed flight
|
||||||
|
*/
|
||||||
|
protected boolean isAllowedToFly() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set whether the player is currently flying.
|
||||||
|
*
|
||||||
|
* @param flying true to fly
|
||||||
|
*/
|
||||||
|
protected void setFlying(boolean flying) {
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Location getBlockIn() {
|
public Location getBlockIn() {
|
||||||
final Location location = getLocation();
|
final Location location = getLocation();
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren