diff --git a/src/main/java/world/bentobox/challenges/panel/admin/EditChallengeGUI.java b/src/main/java/world/bentobox/challenges/panel/admin/EditChallengeGUI.java index 8efe40f..90d02af 100644 --- a/src/main/java/world/bentobox/challenges/panel/admin/EditChallengeGUI.java +++ b/src/main/java/world/bentobox/challenges/panel/admin/EditChallengeGUI.java @@ -440,7 +440,7 @@ public class EditChallengeGUI extends CommonGUI icon = new ItemStack(Material.DROPPER); clickHandler = (panel, user, clickType, slot) -> { - new NumberGUI(this.user, this.challenge.getOrder(), -1, 54, (status, value) -> { + new NumberGUI(this.user, this.challenge.getOrder(), -1, 54, lineLength, (status, value) -> { if (status) { this.challenge.setOrder(value); @@ -648,7 +648,7 @@ public class EditChallengeGUI extends CommonGUI icon = new ItemStack(Material.COBBLESTONE_WALL); clickHandler = (panel, user, clickType, slot) -> { - new NumberGUI(this.user, this.challenge.getSearchRadius(), 0, (status, value) -> { + new NumberGUI(this.user, this.challenge.getSearchRadius(), 0, lineLength, (status, value) -> { if (status) { this.challenge.setSearchRadius(value); @@ -764,7 +764,7 @@ public class EditChallengeGUI extends CommonGUI icon = new ItemStack(Material.EXPERIENCE_BOTTLE); clickHandler = (panel, user, clickType, slot) -> { - new NumberGUI(this.user, this.challenge.getRequiredExperience(), 0, (status, value) -> { + new NumberGUI(this.user, this.challenge.getRequiredExperience(), 0, lineLength, (status, value) -> { if (status) { this.challenge.setRequiredExperience(value); @@ -843,7 +843,7 @@ public class EditChallengeGUI extends CommonGUI { icon = new ItemStack(Material.GOLD_INGOT); clickHandler = (panel, user, clickType, slot) -> { - new NumberGUI(this.user, this.challenge.getRequiredMoney(), 0, (status, value) -> { + new NumberGUI(this.user, this.challenge.getRequiredMoney(), 0, lineLength, (status, value) -> { if (status) { this.challenge.setRequiredMoney(value); @@ -969,7 +969,7 @@ public class EditChallengeGUI extends CommonGUI "[value]", Integer.toString(this.challenge.getRewardExperience()))); icon = new ItemStack(Material.EXPERIENCE_BOTTLE); clickHandler = (panel, user, clickType, slot) -> { - new NumberGUI(this.user, this.challenge.getRewardExperience(), 0, (status, value) -> { + new NumberGUI(this.user, this.challenge.getRewardExperience(), 0, lineLength, (status, value) -> { if (status) { this.challenge.setRewardExperience(value); @@ -995,7 +995,7 @@ public class EditChallengeGUI extends CommonGUI { icon = new ItemStack(Material.GOLD_INGOT); clickHandler = (panel, user, clickType, slot) -> { - new NumberGUI(this.user, this.challenge.getRewardMoney(), 0, (status, value) -> { + new NumberGUI(this.user, this.challenge.getRewardMoney(), 0, lineLength, (status, value) -> { if (status) { this.challenge.setRewardMoney(value); @@ -1076,7 +1076,7 @@ public class EditChallengeGUI extends CommonGUI icon = new ItemStack(Material.COBBLESTONE_WALL); clickHandler = (panel, user, clickType, slot) -> { - new NumberGUI(this.user, this.challenge.getMaxTimes(), 0, (status, value) -> { + new NumberGUI(this.user, this.challenge.getMaxTimes(), 0, lineLength, (status, value) -> { if (status) { this.challenge.setMaxTimes(value); @@ -1167,7 +1167,7 @@ public class EditChallengeGUI extends CommonGUI icon = new ItemStack(Material.GLASS_BOTTLE); clickHandler = (panel, user, clickType, slot) -> { - new NumberGUI(this.user, this.challenge.getRepeatExperienceReward(), 0, (status, value) -> { + new NumberGUI(this.user, this.challenge.getRepeatExperienceReward(), 0, lineLength, (status, value) -> { if (status) { this.challenge.setRepeatExperienceReward(value); @@ -1196,6 +1196,7 @@ public class EditChallengeGUI extends CommonGUI new NumberGUI(this.user, this.challenge.getRepeatMoneyReward(), 0, + lineLength, (status, value) -> { if (status) { diff --git a/src/main/java/world/bentobox/challenges/panel/admin/EditLevelGUI.java b/src/main/java/world/bentobox/challenges/panel/admin/EditLevelGUI.java index bcbbd26..f384695 100644 --- a/src/main/java/world/bentobox/challenges/panel/admin/EditLevelGUI.java +++ b/src/main/java/world/bentobox/challenges/panel/admin/EditLevelGUI.java @@ -388,7 +388,7 @@ public class EditLevelGUI extends CommonGUI "[value]", Integer.toString(this.challengeLevel.getOrder()))); icon = new ItemStack(Material.DROPPER); clickHandler = (panel, user, clickType, slot) -> { - new NumberGUI(this.user, this.challengeLevel.getOrder(), -1, 54, (status, value) -> { + new NumberGUI(this.user, this.challengeLevel.getOrder(), -1, 54, lineLength, (status, value) -> { if (status) { this.challengeLevel.setOrder(value); @@ -412,7 +412,7 @@ public class EditLevelGUI extends CommonGUI icon = new ItemStack(Material.REDSTONE_TORCH); clickHandler = (panel, user, clickType, slot) -> { - new NumberGUI(this.user, this.challengeLevel.getWaiverAmount(), 0, (status, value) -> { + new NumberGUI(this.user, this.challengeLevel.getWaiverAmount(), 0, lineLength, (status, value) -> { if (status) { this.challengeLevel.setWaiverAmount(value); @@ -500,7 +500,7 @@ public class EditLevelGUI extends CommonGUI "[value]", Integer.toString(this.challengeLevel.getRewardExperience()))); icon = new ItemStack(Material.EXPERIENCE_BOTTLE); clickHandler = (panel, user, clickType, slot) -> { - new NumberGUI(this.user, this.challengeLevel.getRewardExperience(), 0, (status, value) -> { + new NumberGUI(this.user, this.challengeLevel.getRewardExperience(), 0, lineLength, (status, value) -> { if (status) { this.challengeLevel.setRewardExperience(value); @@ -526,7 +526,7 @@ public class EditLevelGUI extends CommonGUI { icon = new ItemStack(Material.GOLD_INGOT); clickHandler = (panel, user, clickType, slot) -> { - new NumberGUI(this.user, this.challengeLevel.getRewardMoney(), 0, (status, value) -> { + new NumberGUI(this.user, this.challengeLevel.getRewardMoney(), 0, lineLength, (status, value) -> { if (status) { this.challengeLevel.setRewardMoney(value); diff --git a/src/main/java/world/bentobox/challenges/panel/admin/EditSettingsGUI.java b/src/main/java/world/bentobox/challenges/panel/admin/EditSettingsGUI.java index edb57a9..94b37b5 100644 --- a/src/main/java/world/bentobox/challenges/panel/admin/EditSettingsGUI.java +++ b/src/main/java/world/bentobox/challenges/panel/admin/EditSettingsGUI.java @@ -241,6 +241,7 @@ public class EditSettingsGUI extends CommonGUI new NumberGUI(this.user, this.addon.getChallengesSettings().getLoreLineLength(), 0, + lineLength, (status, value) -> { if (status) { diff --git a/src/main/java/world/bentobox/challenges/panel/admin/ManageBlocksGUI.java b/src/main/java/world/bentobox/challenges/panel/admin/ManageBlocksGUI.java index f57e5c1..2d5fa06 100644 --- a/src/main/java/world/bentobox/challenges/panel/admin/ManageBlocksGUI.java +++ b/src/main/java/world/bentobox/challenges/panel/admin/ManageBlocksGUI.java @@ -175,15 +175,19 @@ public class ManageBlocksGUI extends CommonGUI } else { - new NumberGUI(this.user, this.materialMap.get(material), 1, (status, value) -> { - if (status) - { - // Update value only when something changes. - this.materialMap.put(material, value); - } + new NumberGUI(this.user, + this.materialMap.get(material), + 1, + this.addon.getChallengesSettings().getLoreLineLength(), + (status, value) -> { + if (status) + { + // Update value only when something changes. + this.materialMap.put(material, value); + } - this.build(); - }); + this.build(); + }); } return true; }). diff --git a/src/main/java/world/bentobox/challenges/panel/admin/ManageEntitiesGUI.java b/src/main/java/world/bentobox/challenges/panel/admin/ManageEntitiesGUI.java index 4cc1616..df8e401 100644 --- a/src/main/java/world/bentobox/challenges/panel/admin/ManageEntitiesGUI.java +++ b/src/main/java/world/bentobox/challenges/panel/admin/ManageEntitiesGUI.java @@ -189,15 +189,19 @@ public class ManageEntitiesGUI extends CommonGUI } else { - new NumberGUI(this.user, this.requiredEntities.get(entity), 1, (status, value) -> { - if (status) - { - // Update value only when something changes. - this.requiredEntities.put(entity, value); - } + new NumberGUI(this.user, + this.requiredEntities.get(entity), + 1, + this.addon.getChallengesSettings().getLoreLineLength(), + (status, value) -> { + if (status) + { + // Update value only when something changes. + this.requiredEntities.put(entity, value); + } - this.build(); - }); + this.build(); + }); } return true; }).