9
0
mirror of https://github.com/Xiao-MoMi/Custom-Crops.git synced 2025-12-23 17:09:21 +00:00
This commit is contained in:
XiaoMoMi
2024-03-10 08:45:34 +08:00
parent 1b05db11c9
commit d18ab3ef49
13 changed files with 31 additions and 13 deletions

View File

@@ -25,7 +25,7 @@ public record WaterBar(String left, String empty, String full, String right) {
public String getWaterBar(int current, int max) {
return left +
String.valueOf(full).repeat(current) +
String.valueOf(full).repeat(Math.min(current, max)) +
String.valueOf(empty).repeat(Math.max(max - current, 0)) +
right;
}

View File

@@ -43,6 +43,7 @@ public class State {
setArg("{x}", String.valueOf(location.getBlockX()));
setArg("{y}", String.valueOf(location.getBlockY()));
setArg("{z}", String.valueOf(location.getBlockZ()));
setArg("{world}", location.getWorld().getName());
}
public Player getPlayer() {