Better flight speed placeholder

This commit is contained in:
BradBot_1 2023-10-08 00:15:04 +01:00
parent c6beaeef97
commit 6dd12fab6c

View file

@ -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;
}; };
} }