Better flight speed placeholder
This commit is contained in:
parent
c6beaeef97
commit
6dd12fab6c
|
@ -64,7 +64,7 @@ public final class PlaceHolderApiSupport extends PlaceholderExpansion {
|
||||||
return switch(params.toLowerCase()) {
|
return switch(params.toLowerCase()) {
|
||||||
case "active", "on" -> Boolean.toString(player.isOnline() && ((Player)player).getAllowFlight());
|
case "active", "on" -> Boolean.toString(player.isOnline() && ((Player)player).getAllowFlight());
|
||||||
case "inactive", "off" -> Boolean.toString(!player.isOnline() || !((Player)player).getAllowFlight());
|
case "inactive", "off" -> Boolean.toString(!player.isOnline() || !((Player)player).getAllowFlight());
|
||||||
case "speed" -> Float.toString(player.isOnline() ? 0 : ((Player)player).getFlySpeed());
|
case "speed" -> Float.toString(player.isOnline() ? 0 : ((Player)player).getFlySpeed() * 10);
|
||||||
default -> null;
|
default -> null;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue