diff --git a/common/src/main/java/io/github/flemmli97/flan/claim/Claim.java b/common/src/main/java/io/github/flemmli97/flan/claim/Claim.java index 13d777b..e14be4f 100644 --- a/common/src/main/java/io/github/flemmli97/flan/claim/Claim.java +++ b/common/src/main/java/io/github/flemmli97/flan/claim/Claim.java @@ -550,7 +550,7 @@ public class Claim implements IPermissionContainer { if (title != null && title.getContents().equals("$empty")) title = null; if (sub != null && sub.getContents().equals("$empty")) - title = null; + sub = null; this.enterTitle = title; this.enterSubtitle = sub; this.setDirty(true); @@ -560,7 +560,7 @@ public class Claim implements IPermissionContainer { if (title != null && title.getContents().equals("$empty")) title = null; if (sub != null && sub.getContents().equals("$empty")) - title = null; + sub = null; this.leaveTitle = title; this.leaveSubtitle = sub; this.setDirty(true); diff --git a/common/src/main/java/io/github/flemmli97/flan/config/BuySellHandler.java b/common/src/main/java/io/github/flemmli97/flan/config/BuySellHandler.java index a3dd520..962238d 100644 --- a/common/src/main/java/io/github/flemmli97/flan/config/BuySellHandler.java +++ b/common/src/main/java/io/github/flemmli97/flan/config/BuySellHandler.java @@ -114,7 +114,7 @@ public class BuySellHandler { return CommandCurrency.sellClaimBlocks(player, blocks, this.sellAmount, message); } case ITEM -> { - if (this.ingredient.getItems().length == 0) { + if (this.ingredient.isEmpty()) { return false; } int amount = Mth.floor(blocks * this.sellAmount); diff --git a/common/src/main/java/io/github/flemmli97/flan/config/Config.java b/common/src/main/java/io/github/flemmli97/flan/config/Config.java index 50c3e3d..058bbc7 100644 --- a/common/src/main/java/io/github/flemmli97/flan/config/Config.java +++ b/common/src/main/java/io/github/flemmli97/flan/config/Config.java @@ -92,7 +92,7 @@ public class Config { public boolean log; - public String lang = "default"; + public String lang = "en_us"; public int configVersion = 4; public int preConfigVersion; @@ -144,6 +144,7 @@ public class Config { JsonObject obj = ConfigHandler.GSON.fromJson(reader, JsonObject.class); reader.close(); this.preConfigVersion = ConfigHandler.fromJson(obj, "configVersion", 0); + this.lang = ConfigHandler.fromJson(obj, "lang", this.lang); this.startingBlocks = ConfigHandler.fromJson(obj, "startingBlocks", this.startingBlocks); this.maxClaimBlocks = ConfigHandler.fromJson(obj, "maxClaimBlocks", this.maxClaimBlocks); this.ticksForNextBlock = ConfigHandler.fromJson(obj, "ticksForNextBlock", this.ticksForNextBlock); @@ -241,6 +242,7 @@ public class Config { JsonObject obj = new JsonObject(); obj.addProperty("__comment", "For help with the config refer to https://github.com/Flemmli97/Flan/wiki/Config"); obj.addProperty("configVersion", this.configVersion); + obj.addProperty("lang", this.lang); obj.addProperty("startingBlocks", this.startingBlocks); obj.addProperty("maxClaimBlocks", this.maxClaimBlocks); obj.addProperty("ticksForNextBlock", this.ticksForNextBlock);