From 3cc9c674f362573e03222a7189439982eb19a4b9 Mon Sep 17 00:00:00 2001 From: alexcrea <42614139+alexcrea@users.noreply.github.com> Date: Thu, 8 Aug 2024 01:39:43 +0200 Subject: [PATCH] =?UTF-8?q?Force=20UTF-8=20and=20replace=20=C2=A7=20has=20?= =?UTF-8?q?hex=20value=20(\u00A7)=20to=20utf-8=20=C2=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 4 + build.gradle.kts | 2 + .../cuanvil/gui/config/MainConfigGui.java | 32 ++--- .../gui/config/SelectGroupContainer.java | 10 +- .../gui/config/SelectMaterialContainer.java | 10 +- .../gui/config/ask/ConfirmActionGui.java | 4 +- .../gui/config/ask/SelectItemTypeGui.java | 2 +- .../gui/config/global/BasicConfigGui.java | 122 +++++++++--------- .../config/global/CustomRecipeConfigGui.java | 11 +- .../gui/config/global/EnchantConflictGui.java | 8 +- .../config/global/EnchantCostConfigGui.java | 12 +- .../config/global/EnchantLimitConfigGui.java | 4 +- .../gui/config/global/GroupConfigGui.java | 8 +- .../config/global/UnitRepairConfigGui.java | 16 +-- .../gui/config/list/ElementListConfigGui.java | 4 +- .../list/MappedElementListConfigGui.java | 12 +- .../config/list/MappedGuiListConfigGui.java | 2 +- .../config/list/UnitRepairElementListGui.java | 24 ++-- .../elements/CustomRecipeSubSettingGui.java | 32 ++--- .../EnchantConflictSubSettingGui.java | 34 ++--- .../elements/GroupConfigSubSettingGui.java | 20 +-- .../config/settings/AbstractSettingGui.java | 2 +- .../gui/config/settings/BoolSettingsGui.java | 16 +-- .../gui/config/settings/DoubleSettingGui.java | 32 ++--- .../settings/EnchantCostSettingsGui.java | 24 ++-- .../settings/EnchantSelectSettingGui.java | 10 +- .../settings/GroupSelectSettingGui.java | 6 +- .../gui/config/settings/IntSettingsGui.java | 22 ++-- .../gui/config/settings/ItemSettingGui.java | 10 +- .../settings/MaterialSelectSettingGui.java | 24 ++-- .../cuanvil/gui/util/GuiGlobalActions.java | 2 +- .../cuanvil/gui/util/GuiGlobalItems.java | 16 +-- .../cuanvil/gui/util/GuiSharedConstant.java | 14 +- 33 files changed, 279 insertions(+), 272 deletions(-) diff --git a/.gitignore b/.gitignore index 5d63f6f..23b43ba 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,7 @@ /build/ /out/ .lastDeploymentsId + +#nms submodule build directory ignored +/nms/*/build + diff --git a/build.gradle.kts b/build.gradle.kts index 82b259f..5bf1c2f 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -74,6 +74,8 @@ allprojects { tasks.withType().configureEach { sourceCompatibility = "16" // We aim for java 16 for minecraft 1.16.5. even if it not really suported. targetCompatibility = "16" + + options.encoding = "UTF-8" } kotlin { diff --git a/src/main/java/xyz/alexcrea/cuanvil/gui/config/MainConfigGui.java b/src/main/java/xyz/alexcrea/cuanvil/gui/config/MainConfigGui.java index 877ff34..235e1d4 100644 --- a/src/main/java/xyz/alexcrea/cuanvil/gui/config/MainConfigGui.java +++ b/src/main/java/xyz/alexcrea/cuanvil/gui/config/MainConfigGui.java @@ -23,7 +23,7 @@ public class MainConfigGui extends ChestGui { } private MainConfigGui() { - super(3, "\u00A78Anvil Config", CustomAnvil.instance); + super(3, "§8Anvil Config", CustomAnvil.instance); } public void init(PacketManager packetManager) { @@ -42,8 +42,8 @@ public class MainConfigGui extends ChestGui { ItemMeta basicConfigMeta = basicConfigItemstack.getItemMeta(); assert basicConfigMeta != null; - basicConfigMeta.setDisplayName("\u00A7aBasic Config Menu"); - basicConfigMeta.setLore(Collections.singletonList("\u00A77Click here to open basic config menu")); + basicConfigMeta.setDisplayName("§aBasic Config Menu"); + basicConfigMeta.setLore(Collections.singletonList("§7Click here to open basic config menu")); basicConfigItemstack.setItemMeta(basicConfigMeta); GuiItem basicConfigItem = GuiGlobalItems.goToGuiItem(basicConfigItemstack, new BasicConfigGui(packetManager)); @@ -54,8 +54,8 @@ public class MainConfigGui extends ChestGui { ItemMeta enchantLimitMeta = enchantLimitItemstack.getItemMeta(); assert enchantLimitMeta != null; - enchantLimitMeta.setDisplayName("\u00A7aEnchantment Level Limit"); - enchantLimitMeta.setLore(Collections.singletonList("\u00A77Click here to open enchantment level limit menu")); + enchantLimitMeta.setDisplayName("§aEnchantment Level Limit"); + enchantLimitMeta.setLore(Collections.singletonList("§7Click here to open enchantment level limit menu")); enchantLimitItemstack.setItemMeta(enchantLimitMeta); GuiItem enchantLimitItem = GuiGlobalItems.goToGuiItem(enchantLimitItemstack, new EnchantLimitConfigGui()); @@ -66,8 +66,8 @@ public class MainConfigGui extends ChestGui { ItemMeta enchantCostMeta = enchantCostItemstack.getItemMeta(); assert enchantCostMeta != null; - enchantCostMeta.setDisplayName("\u00A7aEnchantment Cost"); - enchantCostMeta.setLore(Collections.singletonList("\u00A77Click here to open enchantment costs menu")); + enchantCostMeta.setDisplayName("§aEnchantment Cost"); + enchantCostMeta.setLore(Collections.singletonList("§7Click here to open enchantment costs menu")); enchantCostItemstack.setItemMeta(enchantCostMeta); GuiItem enchantCostItem = GuiGlobalItems.goToGuiItem(enchantCostItemstack, new EnchantCostConfigGui()); @@ -78,8 +78,8 @@ public class MainConfigGui extends ChestGui { ItemMeta enchantConflictMeta = enchantConflictItemstack.getItemMeta(); assert enchantConflictMeta != null; - enchantConflictMeta.setDisplayName("\u00A7aEnchantment Conflict"); - enchantConflictMeta.setLore(Collections.singletonList("\u00A77Click here to open enchantment conflict menu")); + enchantConflictMeta.setDisplayName("§aEnchantment Conflict"); + enchantConflictMeta.setLore(Collections.singletonList("§7Click here to open enchantment conflict menu")); enchantConflictItemstack.setItemMeta(enchantConflictMeta); GuiItem enchantConflictItem = GuiGlobalItems.goToGuiItem(enchantConflictItemstack, EnchantConflictGui.getInstance()); @@ -90,8 +90,8 @@ public class MainConfigGui extends ChestGui { ItemMeta groupMeta = groupItemstack.getItemMeta(); assert groupMeta != null; - groupMeta.setDisplayName("\u00A7aGroups"); - groupMeta.setLore(Collections.singletonList("\u00A77Click here to open material group menu")); + groupMeta.setDisplayName("§aGroups"); + groupMeta.setLore(Collections.singletonList("§7Click here to open material group menu")); groupItemstack.setItemMeta(groupMeta); GuiItem groupConfigItem = GuiGlobalItems.goToGuiItem(groupItemstack, GroupConfigGui.getInstance()); @@ -103,8 +103,8 @@ public class MainConfigGui extends ChestGui { ItemMeta unitRepairMeta = unirRepairItemstack.getItemMeta(); assert unitRepairMeta != null; - unitRepairMeta.setDisplayName("\u00A7aUnit Repair"); - unitRepairMeta.setLore(Collections.singletonList("\u00A77Click here to open anvil unit repair menu")); + unitRepairMeta.setDisplayName("§aUnit Repair"); + unitRepairMeta.setLore(Collections.singletonList("§7Click here to open anvil unit repair menu")); unirRepairItemstack.setItemMeta(unitRepairMeta); GuiItem unitRepairItem = GuiGlobalItems.goToGuiItem(unirRepairItemstack, UnitRepairConfigGui.getInstance()); @@ -115,8 +115,8 @@ public class MainConfigGui extends ChestGui { ItemMeta customRecipeMeta = customRecipeItemstack.getItemMeta(); assert customRecipeMeta != null; - customRecipeMeta.setDisplayName("\u00A7aCustom recipes"); - customRecipeMeta.setLore(Collections.singletonList("\u00A77Click here to open anvil custom recipe menu")); + customRecipeMeta.setDisplayName("§aCustom recipes"); + customRecipeMeta.setLore(Collections.singletonList("§7Click here to open anvil custom recipe menu")); customRecipeItemstack.setItemMeta(customRecipeMeta); GuiItem customRecipeItem = GuiGlobalItems.goToGuiItem(customRecipeItemstack, CustomRecipeConfigGui.getInstance()); @@ -127,7 +127,7 @@ public class MainConfigGui extends ChestGui { ItemMeta quitMeta = quitItemstack.getItemMeta(); assert quitMeta != null; - quitMeta.setDisplayName("\u00A7cQuit"); + quitMeta.setDisplayName("§cQuit"); quitItemstack.setItemMeta(quitMeta); GuiItem quitItem = new GuiItem(quitItemstack, event -> { diff --git a/src/main/java/xyz/alexcrea/cuanvil/gui/config/SelectGroupContainer.java b/src/main/java/xyz/alexcrea/cuanvil/gui/config/SelectGroupContainer.java index c8668d0..49f8b3b 100644 --- a/src/main/java/xyz/alexcrea/cuanvil/gui/config/SelectGroupContainer.java +++ b/src/main/java/xyz/alexcrea/cuanvil/gui/config/SelectGroupContainer.java @@ -19,12 +19,12 @@ public interface SelectGroupContainer { static List getGroupLore(SelectGroupContainer container, String containerType, String groupAction){ // Prepare group lore ArrayList groupLore = new ArrayList<>(); - groupLore.add("\u00A77Allow you to select a list of \u00A73Groups \u00A77that this " + containerType + " should " + groupAction); + groupLore.add("§7Allow you to select a list of §3Groups §7that this " + containerType + " should " + groupAction); Set grouos = container.getSelectedGroups(); if (grouos.isEmpty()) { - groupLore.add("\u00A77There is no "+groupAction+"d group for this "+containerType+"."); + groupLore.add("§7There is no "+groupAction+"d group for this "+containerType+"."); } else { - groupLore.add("\u00A77List of "+groupAction+"d groups for this "+containerType+":"); + groupLore.add("§7List of "+groupAction+"d groups for this "+containerType+":"); Iterator groupIterator = grouos.iterator(); boolean greaterThanMax = grouos.size() > 5; @@ -32,11 +32,11 @@ public interface SelectGroupContainer { for (int i = 0; i < maxindex; i++) { // format string like "- Melee Weapons" String formattedName = CasedStringUtil.snakeToUpperSpacedCase(groupIterator.next().getName()); - groupLore.add("\u00A77- \u00A73" + formattedName); + groupLore.add("§7- §3" + formattedName); } if (greaterThanMax) { - groupLore.add("\u00A77And " + (grouos.size() - 4) + " more..."); + groupLore.add("§7And " + (grouos.size() - 4) + " more..."); } } return groupLore; diff --git a/src/main/java/xyz/alexcrea/cuanvil/gui/config/SelectMaterialContainer.java b/src/main/java/xyz/alexcrea/cuanvil/gui/config/SelectMaterialContainer.java index 397030e..2f76694 100644 --- a/src/main/java/xyz/alexcrea/cuanvil/gui/config/SelectMaterialContainer.java +++ b/src/main/java/xyz/alexcrea/cuanvil/gui/config/SelectMaterialContainer.java @@ -16,12 +16,12 @@ public interface SelectMaterialContainer { static List getMaterialLore(SelectMaterialContainer container, String containerType, String action){ // Prepare material lore ArrayList groupLore = new ArrayList<>(); - groupLore.add("\u00A77Allow you to select a list of \u00A7ematerials \u00A77that this " + containerType + " should " + action); + groupLore.add("§7Allow you to select a list of §ematerials §7that this " + containerType + " should " + action); Set materialSet = container.getSelectedMaterials(); if (materialSet.isEmpty()) { - groupLore.add("\u00A77There is no "+action+"d material for this "+containerType+"."); + groupLore.add("§7There is no "+action+"d material for this "+containerType+"."); } else { - groupLore.add("\u00A77List of "+action+"d materials for this "+containerType+":"); + groupLore.add("§7List of "+action+"d materials for this "+containerType+":"); Iterator materialIterator = materialSet.iterator(); boolean greaterThanMax = materialSet.size() > 5; @@ -29,11 +29,11 @@ public interface SelectMaterialContainer { for (int i = 0; i < maxindex; i++) { // format string like "- Stone Sword" String formattedName = CasedStringUtil.snakeToUpperSpacedCase(materialIterator.next().name().toLowerCase()); - groupLore.add("\u00A77- \u00A7e" + formattedName); + groupLore.add("§7- §e" + formattedName); } if (greaterThanMax) { - groupLore.add("\u00A77And " + (materialSet.size() - 4) + " more..."); + groupLore.add("§7And " + (materialSet.size() - 4) + " more..."); } } return groupLore; diff --git a/src/main/java/xyz/alexcrea/cuanvil/gui/config/ask/ConfirmActionGui.java b/src/main/java/xyz/alexcrea/cuanvil/gui/config/ask/ConfirmActionGui.java index d306ff1..56bf848 100644 --- a/src/main/java/xyz/alexcrea/cuanvil/gui/config/ask/ConfirmActionGui.java +++ b/src/main/java/xyz/alexcrea/cuanvil/gui/config/ask/ConfirmActionGui.java @@ -45,7 +45,7 @@ public class ConfirmActionGui extends AbstractAskGui { } if (!success) { - event.getWhoClicked().sendMessage("\u00A7cAction could not be completed. "); + event.getWhoClicked().sendMessage("§cAction could not be completed. "); } backOnConfirm.show(player); @@ -55,7 +55,7 @@ public class ConfirmActionGui extends AbstractAskGui { ItemStack infoItem = new ItemStack(Material.PAPER); ItemMeta infoMeta = infoItem.getItemMeta(); - infoMeta.setDisplayName("\u00A7eAre you sure ?"); + infoMeta.setDisplayName("§eAre you sure ?"); if(actionDescription != null){ infoMeta.setLore(Arrays.asList(actionDescription.split("\n"))); } diff --git a/src/main/java/xyz/alexcrea/cuanvil/gui/config/ask/SelectItemTypeGui.java b/src/main/java/xyz/alexcrea/cuanvil/gui/config/ask/SelectItemTypeGui.java index eb15243..246f2eb 100644 --- a/src/main/java/xyz/alexcrea/cuanvil/gui/config/ask/SelectItemTypeGui.java +++ b/src/main/java/xyz/alexcrea/cuanvil/gui/config/ask/SelectItemTypeGui.java @@ -80,7 +80,7 @@ public class SelectItemTypeGui extends AbstractAskGui { private ItemStack setDisplayMeta(ItemStack item, String actionDescription){ ItemMeta meta = item.getItemMeta(); - meta.setDisplayName("\u00A7ePlace an item here"); + meta.setDisplayName("§ePlace an item here"); meta.setLore(Arrays.asList(actionDescription.split("\n"))); item.setItemMeta(meta); diff --git a/src/main/java/xyz/alexcrea/cuanvil/gui/config/global/BasicConfigGui.java b/src/main/java/xyz/alexcrea/cuanvil/gui/config/global/BasicConfigGui.java index c0324f3..bb7e3fb 100644 --- a/src/main/java/xyz/alexcrea/cuanvil/gui/config/global/BasicConfigGui.java +++ b/src/main/java/xyz/alexcrea/cuanvil/gui/config/global/BasicConfigGui.java @@ -44,7 +44,7 @@ public class BasicConfigGui extends ChestGui implements ValueUpdatableGui { * Constructor of this Global gui for basic settings. */ public BasicConfigGui(PacketManager packetManager) { - super(4, "\u00A78Basic Config", CustomAnvil.instance); + super(4, "§8Basic Config", CustomAnvil.instance); if(INSTANCE == null) INSTANCE = this; this.packetManager = packetManager; @@ -99,33 +99,33 @@ public class BasicConfigGui extends ChestGui implements ValueUpdatableGui { */ protected void prepareValues() { // cap anvil cost - this.capAnvilCost = BoolSettingsGui.boolFactory("\u00A78Cap Anvil Cost ?", this, + this.capAnvilCost = BoolSettingsGui.boolFactory("§8Cap Anvil Cost ?", this, ConfigHolder.DEFAULT_CONFIG, ConfigOptions.CAP_ANVIL_COST, ConfigOptions.DEFAULT_CAP_ANVIL_COST, - "\u00A77All anvil cost will be capped to \u00A7aMax Anvil Cost\u00A77 if enabled.", - "\u00A77In other words:", - "\u00A77For any anvil cost greater than \u00A7aMax Anvil Cost\u00A77, Cost will be set to \u00A7aMax Anvil Cost\u00A77."); + "§7All anvil cost will be capped to §aMax Anvil Cost§7 if enabled.", + "§7In other words:", + "§7For any anvil cost greater than §aMax Anvil Cost§7, Cost will be set to §aMax Anvil Cost§7."); // cap anvil cost not needed ItemStack item = new ItemStack(Material.BARRIER); ItemMeta meta = item.getItemMeta(); assert meta != null; - meta.setDisplayName("\u00A7cCap Anvil Cost ?"); - meta.setLore(Collections.singletonList("\u00A77This config only work if \u00A7cLimit Repair Cost\u00A77 is disabled.")); + meta.setDisplayName("§cCap Anvil Cost ?"); + meta.setLore(Collections.singletonList("§7This config only work if §cLimit Repair Cost§7 is disabled.")); item.setItemMeta(meta); this.noCapRepairItem = new GuiItem(item, GuiGlobalActions.stayInPlace, CustomAnvil.instance); // repair cost item IntRange range = ConfigOptions.MAX_ANVIL_COST_RANGE; - this.maxAnvilCost = IntSettingsGui.intFactory("\u00A78Max Anvil Cost", this, + this.maxAnvilCost = IntSettingsGui.intFactory("§8Max Anvil Cost", this, ConfigOptions.MAX_ANVIL_COST, ConfigHolder.DEFAULT_CONFIG, Arrays.asList( - "\u00A77Max cost the Anvil can get to.", - "\u00A77Valid values include \u00A7e0 \u00A77to \u00A7e1000\u00A77.", - "\u00A77Cost will be displayed as \u00A7cToo Expensive\u00A77:", - "\u00A77- If Cost is above \u00A7e39", - "\u00A77- And \u00A7eReplace Too Expensive\u00A77 is disabled" + "§7Max cost the Anvil can get to.", + "§7Valid values include §e0 §7to §e1000§7.", + "§7Cost will be displayed as §cToo Expensive§7:", + "§7- If Cost is above §e39", + "§7- And §eReplace Too Expensive§7 is disabled" ), range.getFirst(), range.getLast(), ConfigOptions.DEFAULT_MAX_ANVIL_COST, @@ -135,22 +135,22 @@ public class BasicConfigGui extends ChestGui implements ValueUpdatableGui { meta = item.getItemMeta(); assert meta != null; - meta.setDisplayName("\u00A7cMax Anvil Cost"); - meta.setLore(Collections.singletonList("\u00A77This config only work if \u00A7cLimit Repair Cost\u00A77 is disabled.")); + meta.setDisplayName("§cMax Anvil Cost"); + meta.setLore(Collections.singletonList("§7This config only work if §cLimit Repair Cost§7 is disabled.")); item.setItemMeta(meta); this.noMaxCostItem = new GuiItem(item, GuiGlobalActions.stayInPlace, CustomAnvil.instance); // remove repair limit item - this.removeAnvilCostLimit = BoolSettingsGui.boolFactory("\u00A78Remove Anvil Cost Limit ?", this, + this.removeAnvilCostLimit = BoolSettingsGui.boolFactory("§8Remove Anvil Cost Limit ?", this, ConfigHolder.DEFAULT_CONFIG, ConfigOptions.REMOVE_ANVIL_COST_LIMIT, ConfigOptions.DEFAULT_REMOVE_ANVIL_COST_LIMIT, - "\u00A77Whether the anvil's cost limit should be removed entirely.", - "\u00A77The anvil will still visually display \u00A7cToo Expensive\u00A77 if \u00A7eReplace Too Expensive\u00A77 is disabled.", - "\u00A77However, the action will be completable if xp requirement is meet."); + "§7Whether the anvil's cost limit should be removed entirely.", + "§7The anvil will still visually display §cToo Expensive§7 if §eReplace Too Expensive§7 is disabled.", + "§7However, the action will be completable if xp requirement is meet."); // replace too expensive item - this.replaceTooExpensive = BoolSettingsGui.boolFactory("\u00A78Replace Too Expensive ?", this, + this.replaceTooExpensive = BoolSettingsGui.boolFactory("§8Replace Too Expensive ?", this, ConfigHolder.DEFAULT_CONFIG, ConfigOptions.REPLACE_TOO_EXPENSIVE, ConfigOptions.DEFAULT_REPLACE_TOO_EXPENSIVE, getReplaceToExpensiveLore()); @@ -161,23 +161,23 @@ public class BasicConfigGui extends ChestGui implements ValueUpdatableGui { // item repair cost range = ConfigOptions.REPAIR_COST_RANGE; - this.itemRepairCost = IntSettingsGui.intFactory("\u00A78Item Repair Cost", this, + this.itemRepairCost = IntSettingsGui.intFactory("§8Item Repair Cost", this, ConfigOptions.ITEM_REPAIR_COST, ConfigHolder.DEFAULT_CONFIG, Arrays.asList( - "\u00A77XP Level amount added to the anvil when the item", - "\u00A77is repaired by another item of the same type." + "§7XP Level amount added to the anvil when the item", + "§7is repaired by another item of the same type." ), range.getFirst(), range.getLast(), ConfigOptions.DEFAULT_ITEM_REPAIR_COST, 1, 5, 10, 50, 100); // unit repair cost - this.unitRepairCost = IntSettingsGui.intFactory("\u00A78Unit Repair Cost", this, + this.unitRepairCost = IntSettingsGui.intFactory("§8Unit Repair Cost", this, ConfigOptions.UNIT_REPAIR_COST, ConfigHolder.DEFAULT_CONFIG, Arrays.asList( - "\u00A77XP Level amount added to the anvil when the item is repaired by an \u00A7eunit\u00A77.", - "\u00A77For example: a Diamond on a Diamond Sword.", - "\u00A77What's considered unit for what can be edited on the unit repair configuration." + "§7XP Level amount added to the anvil when the item is repaired by an §eunit§7.", + "§7For example: a Diamond on a Diamond Sword.", + "§7What's considered unit for what can be edited on the unit repair configuration." ), range.getFirst(), range.getLast(), ConfigOptions.DEFAULT_UNIT_REPAIR_COST, @@ -185,10 +185,10 @@ public class BasicConfigGui extends ChestGui implements ValueUpdatableGui { // item rename cost range = ConfigOptions.ITEM_RENAME_COST_RANGE; - this.itemRenameCost = IntSettingsGui.intFactory("\u00A78Rename Cost", this, + this.itemRenameCost = IntSettingsGui.intFactory("§8Rename Cost", this, ConfigOptions.ITEM_RENAME_COST, ConfigHolder.DEFAULT_CONFIG, Arrays.asList( - "\u00A77XP Level amount added to the anvil when the item is renamed." + "§7XP Level amount added to the anvil when the item is renamed." ), range.getFirst(), range.getLast(), ConfigOptions.DEFAULT_ITEM_RENAME_COST, @@ -196,11 +196,11 @@ public class BasicConfigGui extends ChestGui implements ValueUpdatableGui { // sacrifice illegal enchant cost range = ConfigOptions.SACRIFICE_ILLEGAL_COST_RANGE; - this.sacrificeIllegalEnchantCost = IntSettingsGui.intFactory("\u00A78Sacrifice Illegal Enchant Cost", this, + this.sacrificeIllegalEnchantCost = IntSettingsGui.intFactory("§8Sacrifice Illegal Enchant Cost", this, ConfigOptions.SACRIFICE_ILLEGAL_COST, ConfigHolder.DEFAULT_CONFIG, Arrays.asList( - "\u00A77XP Level amount added to the anvil when a sacrifice enchantment", - "\u00A77conflict With one of the left item enchantment" + "§7XP Level amount added to the anvil when a sacrifice enchantment", + "§7conflict With one of the left item enchantment" ), range.getFirst(), range.getLast(), ConfigOptions.DEFAULT_SACRIFICE_ILLEGAL_COST, @@ -211,48 +211,48 @@ public class BasicConfigGui extends ChestGui implements ValueUpdatableGui { // ------------- // Allow us of color code - this.allowColorCode = BoolSettingsGui.boolFactory("\u00A78Allow Use Of Color Code ?", this, + this.allowColorCode = BoolSettingsGui.boolFactory("§8Allow Use Of Color Code ?", this, ConfigHolder.DEFAULT_CONFIG, ConfigOptions.ALLOW_COLOR_CODE, ConfigOptions.DEFAULT_ALLOW_COLOR_CODE, - "\u00A77Whether players can use color code.", - "\u00A77Color code a formatted like \u00A7a&a\u00A77 and is used in the rename field of the anvil.", - "\u00A77Player may need permission to use color code if \u00A7ePlayer need permission to use color\u00A77 is enabled."); + "§7Whether players can use color code.", + "§7Color code a formatted like §a&a§7 and is used in the rename field of the anvil.", + "§7Player may need permission to use color code if §ePlayer need permission to use color§7 is enabled."); // Allow us of hexadecimal color - this.allowHexColor = BoolSettingsGui.boolFactory("\u00A78Allow Use Of Hexadecimal Color ?", this, + this.allowHexColor = BoolSettingsGui.boolFactory("§8Allow Use Of Hexadecimal Color ?", this, ConfigHolder.DEFAULT_CONFIG, ConfigOptions.ALLOW_HEXADECIMAL_COLOR, ConfigOptions.DEFAULT_ALLOW_HEXADECIMAL_COLOR, - "\u00A77Whether players can use hexadecimal color.", - "\u00A77Color code a formatted like \u00A72#012345 \u00A77and is used in the rename field of the anvil.", - "\u00A77Player may need permission to use color code if \u00A7ePermission Needed For Color\u00A77 is enabled."); + "§7Whether players can use hexadecimal color.", + "§7Color code a formatted like §2#012345 §7and is used in the rename field of the anvil.", + "§7Player may need permission to use color code if §ePermission Needed For Color§7 is enabled."); // Permission needed for color - this.permissionNeededForColor = BoolSettingsGui.boolFactory("\u00A78Need Permission To Use Color ?", this, + this.permissionNeededForColor = BoolSettingsGui.boolFactory("§8Need Permission To Use Color ?", this, ConfigHolder.DEFAULT_CONFIG, ConfigOptions.PERMISSION_NEEDED_FOR_COLOR, ConfigOptions.DEFAULT_PERMISSION_NEEDED_FOR_COLOR, - "\u00A77Whether players should have permission to be able to use colors.", - "\u00A77Give player \u00A7eca.color.code\u00A77 Permission to allow use of color code.", - "\u00A77Give player \u00A7eca.color.hex\u00A77 Permission to allow use of hexadecimal color."); + "§7Whether players should have permission to be able to use colors.", + "§7Give player §eca.color.code§7 Permission to allow use of color code.", + "§7Give player §eca.color.hex§7 Permission to allow use of hexadecimal color."); // Permission needed for color not necessary item = new ItemStack(Material.BARRIER); meta = item.getItemMeta(); assert meta != null; - meta.setDisplayName("\u00A7cNeed Permission To Use Color ?"); - meta.setLore(Arrays.asList("\u00A77This config can do something only if one of the following config is enabled:", - "\u00A77- \u00A7aAllow Use Of Color Code", - "\u00A77- \u00A7aAllow Use Of Hexadecimal Color")); + meta.setDisplayName("§cNeed Permission To Use Color ?"); + meta.setLore(Arrays.asList("§7This config can do something only if one of the following config is enabled:", + "§7- §aAllow Use Of Color Code", + "§7- §aAllow Use Of Hexadecimal Color")); item.setItemMeta(meta); this.noPermissionNeededItem = new GuiItem(item, GuiGlobalActions.stayInPlace, CustomAnvil.instance); // Cost of using color range = ConfigOptions.USE_OF_COLOR_COST_RANGE; - this.useOfColorCost = IntSettingsGui.intFactory("\u00A78Cost Of Using Color", this, + this.useOfColorCost = IntSettingsGui.intFactory("§8Cost Of Using Color", this, ConfigOptions.USE_OF_COLOR_COST, ConfigHolder.DEFAULT_CONFIG, Arrays.asList( - "\u00A77XP level cost when using color code or hexadecimal color using the anvil.", - "\u00A77conflict With one of the left item enchantment" + "§7XP level cost when using color code or hexadecimal color using the anvil.", + "§7conflict With one of the left item enchantment" ), range.getFirst(), range.getLast(), ConfigOptions.DEFAULT_USE_OF_COLOR_COST, @@ -263,10 +263,10 @@ public class BasicConfigGui extends ChestGui implements ValueUpdatableGui { meta = item.getItemMeta(); assert meta != null; - meta.setDisplayName("\u00A7cCost Of Using Color"); - meta.setLore(Arrays.asList("\u00A77This config can do something only if one of the following config is enabled:", - "\u00A77- \u00A7aAllow Use Of Color Code", - "\u00A77- \u00A7aAllow Use Of Hexadecimal Color")); + meta.setDisplayName("§cCost Of Using Color"); + meta.setLore(Arrays.asList("§7This config can do something only if one of the following config is enabled:", + "§7- §aAllow Use Of Color Code", + "§7- §aAllow Use Of Hexadecimal Color")); item.setItemMeta(meta); this.noColorCostItem = new GuiItem(item, GuiGlobalActions.stayInPlace, CustomAnvil.instance); @@ -275,15 +275,15 @@ public class BasicConfigGui extends ChestGui implements ValueUpdatableGui { @NotNull private String[] getReplaceToExpensiveLore() { ArrayList lore = new ArrayList<>(); - lore.add("\u00A77Whenever anvil cost is above \u00A7e39\u00A77 should display the true price and not \u00A7cToo Expensive\u00A77."); - lore.add("\u00A77However, when bypassing \u00A7cToo Expensive\u00A77, anvil price will be displayed as \u00A7aGreen\u00A77."); - lore.add("\u00A77Even if cost is displayed as \u00A7aGreen\u00A77:"); - lore.add("\u00A77If the player do not have the required xp level, the action will not be completable."); + lore.add("§7Whenever anvil cost is above §e39§7 should display the true price and not §cToo Expensive§7."); + lore.add("§7However, when bypassing §cToo Expensive§7, anvil price will be displayed as §aGreen§7."); + lore.add("§7Even if cost is displayed as §aGreen§7:"); + lore.add("§7If the player do not have the required xp level, the action will not be completable."); if(!this.packetManager.getCanSetInstantBuild()){ lore.add(""); - lore.add("\u00A74/!\\\u00A7cCaution\u00A74/!\\ \u00A7cYou need ProtocoLib installed and working or a newer version of this plugin for this to work."); - lore.add("\u00A7cCurrently ProtocoLib is not detected."); + lore.add("§4/!\\§cCaution§4/!\\ §cYou need ProtocoLib installed and working or a newer version of this plugin for this to work."); + lore.add("§cCurrently ProtocoLib is not detected."); } String[] loreAsArray = new String[lore.size()]; diff --git a/src/main/java/xyz/alexcrea/cuanvil/gui/config/global/CustomRecipeConfigGui.java b/src/main/java/xyz/alexcrea/cuanvil/gui/config/global/CustomRecipeConfigGui.java index 81bb259..5a68e6e 100644 --- a/src/main/java/xyz/alexcrea/cuanvil/gui/config/global/CustomRecipeConfigGui.java +++ b/src/main/java/xyz/alexcrea/cuanvil/gui/config/global/CustomRecipeConfigGui.java @@ -10,6 +10,7 @@ import org.jetbrains.annotations.Nullable; import xyz.alexcrea.cuanvil.config.ConfigHolder; import xyz.alexcrea.cuanvil.gui.config.list.MappedGuiListConfigGui; import xyz.alexcrea.cuanvil.gui.config.list.elements.CustomRecipeSubSettingGui; +import xyz.alexcrea.cuanvil.gui.util.GuiSharedConstant; import xyz.alexcrea.cuanvil.recipe.AnvilCustomRecipe; import xyz.alexcrea.cuanvil.util.CasedStringUtil; @@ -54,15 +55,15 @@ public class CustomRecipeConfigGui extends MappedGuiListConfigGui lore = new ArrayList<>(); - lore.add("\u00A77Item Cost: \u00A7e" + itemCost); - lore.add("\u00A77Book Cost: \u00A7e" + bookCost); + lore.add("§7Item Cost: §e" + itemCost); + lore.add("§7Book Cost: §e" + bookCost); List displayLore = factory.getDisplayLore(); if(!displayLore.isEmpty()){ diff --git a/src/main/java/xyz/alexcrea/cuanvil/gui/config/global/EnchantLimitConfigGui.java b/src/main/java/xyz/alexcrea/cuanvil/gui/config/global/EnchantLimitConfigGui.java index 9529495..f06d364 100644 --- a/src/main/java/xyz/alexcrea/cuanvil/gui/config/global/EnchantLimitConfigGui.java +++ b/src/main/java/xyz/alexcrea/cuanvil/gui/config/global/EnchantLimitConfigGui.java @@ -29,7 +29,7 @@ public class EnchantLimitConfigGui extends AbstractEnchantConfigGui { Material type = itemStack.getType(); diff --git a/src/main/java/xyz/alexcrea/cuanvil/gui/config/list/ElementListConfigGui.java b/src/main/java/xyz/alexcrea/cuanvil/gui/config/list/ElementListConfigGui.java index 8e7d189..89135a5 100644 --- a/src/main/java/xyz/alexcrea/cuanvil/gui/config/list/ElementListConfigGui.java +++ b/src/main/java/xyz/alexcrea/cuanvil/gui/config/list/ElementListConfigGui.java @@ -199,7 +199,7 @@ public abstract class ElementListConfigGui< T > extends ChestGui implements Valu ItemStack leftItem = this.goLeftItem.getItem(); ItemMeta leftMeta = leftItem.getItemMeta(); - leftMeta.setDisplayName("\u00A7eReturn to page " + (page)); + leftMeta.setDisplayName("§eReturn to page " + (page)); leftItem.setItemMeta(leftMeta); this.goLeftItem.setItem(leftItem); @@ -216,7 +216,7 @@ public abstract class ElementListConfigGui< T > extends ChestGui implements Valu ItemStack rightItem = this.goRightItem.getItem(); ItemMeta rightMeta = rightItem.getItemMeta(); - rightMeta.setDisplayName("\u00A7eGo to page " + (page + 2)); + rightMeta.setDisplayName("§eGo to page " + (page + 2)); rightItem.setItemMeta(rightMeta); this.goRightItem.setItem(rightItem); diff --git a/src/main/java/xyz/alexcrea/cuanvil/gui/config/list/MappedElementListConfigGui.java b/src/main/java/xyz/alexcrea/cuanvil/gui/config/list/MappedElementListConfigGui.java index f2793a8..ced5fd2 100644 --- a/src/main/java/xyz/alexcrea/cuanvil/gui/config/list/MappedElementListConfigGui.java +++ b/src/main/java/xyz/alexcrea/cuanvil/gui/config/list/MappedElementListConfigGui.java @@ -29,11 +29,11 @@ public abstract class MappedElementListConfigGui< T, S > extends ElementListConf ItemMeta createMeta = createItem.getItemMeta(); assert createMeta != null; - createMeta.setDisplayName("\u00A7aCreate new "+genericDisplayedName()); + createMeta.setDisplayName("§aCreate new "+genericDisplayedName()); createMeta.setLore(Arrays.asList( - "\u00A77Create a new "+genericDisplayedName()+".", - "\u00A77You will be asked to name the "+genericDisplayedName()+" in chat.", - "\u00A77Then, you should edit the "+genericDisplayedName()+" config as you need" + "§7Create a new "+genericDisplayedName()+".", + "§7You will be asked to name the "+genericDisplayedName()+" in chat.", + "§7Then, you should edit the "+genericDisplayedName()+" config as you need" )); createItem.setItemMeta(createMeta); @@ -50,8 +50,8 @@ public abstract class MappedElementListConfigGui< T, S > extends ElementListConf } player.closeInventory(); - player.sendMessage("\u00A7eWrite the "+genericDisplayedName()+" name you want to create in the chat.\n" + - "\u00A7eOr write \u00A7ccancel \u00A7eto go back to "+genericDisplayedName()+" config menu"); + player.sendMessage("§eWrite the "+genericDisplayedName()+" name you want to create in the chat.\n" + + "§eOr write §ccancel §eto go back to "+genericDisplayedName()+" config menu"); CustomAnvil.Companion.getChatListener().setListenedCallback(player, prepareCreateItemConsumer(player)); diff --git a/src/main/java/xyz/alexcrea/cuanvil/gui/config/list/MappedGuiListConfigGui.java b/src/main/java/xyz/alexcrea/cuanvil/gui/config/list/MappedGuiListConfigGui.java index 9c73760..cf4b852 100644 --- a/src/main/java/xyz/alexcrea/cuanvil/gui/config/list/MappedGuiListConfigGui.java +++ b/src/main/java/xyz/alexcrea/cuanvil/gui/config/list/MappedGuiListConfigGui.java @@ -74,7 +74,7 @@ public abstract class MappedGuiListConfigGui< T, S extends ElementMappedToListGu // Not the most efficient on large number of conflict, but it should not run often. for (T generic : getEveryDisplayableInstanceOfGeneric()) { if (generic.toString().equalsIgnoreCase(message)) { - player.sendMessage("\u00A7cPlease enter a "+genericDisplayedName()+" name that do not already exist..."); + player.sendMessage("§cPlease enter a "+genericDisplayedName()+" name that do not already exist..."); // wait next message. CustomAnvil.Companion.getChatListener().setListenedCallback(player, selfRef.get()); return; diff --git a/src/main/java/xyz/alexcrea/cuanvil/gui/config/list/UnitRepairElementListGui.java b/src/main/java/xyz/alexcrea/cuanvil/gui/config/list/UnitRepairElementListGui.java index ed38078..9a16aa4 100644 --- a/src/main/java/xyz/alexcrea/cuanvil/gui/config/list/UnitRepairElementListGui.java +++ b/src/main/java/xyz/alexcrea/cuanvil/gui/config/list/UnitRepairElementListGui.java @@ -35,7 +35,7 @@ public class UnitRepairElementListGui extends SettingGuiListConfigGui getCreateItemLore() { return Arrays.asList( - "\u00A77Select a new item to be repairable.", - "\u00A77You will be asked the material to use." + "§7Select a new item to be repairable.", + "§7You will be asked the material to use." ); } @@ -64,19 +64,19 @@ public class UnitRepairElementListGui extends SettingGuiListConfigGui { ItemMeta meta = itemStack.getItemMeta(); Material type = itemStack.getType(); if(!(meta instanceof Damageable) || (type.getMaxDurability() <= 0)) { - player.sendMessage("\u00A7cThis item can't be damaged, so it can't be repaired."); + player.sendMessage("§cThis item can't be damaged, so it can't be repaired."); return; } if(type == this.parentMaterial){ - player.sendMessage("\u00A7cItem can't repair something of the same type."); + player.sendMessage("§cItem can't repair something of the same type."); return; } @@ -105,7 +105,7 @@ public class UnitRepairElementListGui extends SettingGuiListConfigGui { event.setCancelled(true); EnchantSelectSettingGui enchantGui = new EnchantSelectSettingGui( - "\u00A7e" + CasedStringUtil.snakeToUpperSpacedCase(enchantConflict.toString()) + "\u00A75", + "§e" + CasedStringUtil.snakeToUpperSpacedCase(enchantConflict.toString()) + "§5", this, this); enchantGui.show(event.getWhoClicked()); }, CustomAnvil.instance); @@ -90,17 +90,17 @@ public class EnchantConflictSubSettingGui extends MappedToListSubSettingGui impl this.groupSettingItem = new GuiItem(new ItemStack(Material.PAPER), event -> { event.setCancelled(true); GroupSelectSettingGui enchantGui = new GroupSelectSettingGui( - "\u00A7e" + CasedStringUtil.snakeToUpperSpacedCase(this.enchantConflict.toString()) + " \u00A73Groups", + "§e" + CasedStringUtil.snakeToUpperSpacedCase(this.enchantConflict.toString()) + " §3Groups", this, this, 0); enchantGui.show(event.getWhoClicked()); }, CustomAnvil.instance); this.minBeforeActiveSettingFactory = IntSettingsGui.intFactory( - "\u00A78Minimum enchantment count", + "§8Minimum enchantment count", this, this.enchantConflict + ".maxEnchantmentBeforeConflict", ConfigHolder.CONFLICT_HOLDER, Arrays.asList( - "\u00A77Minimum enchantment count set to X mean only X enchantment can be put", - "\u00A77on an item before the conflict is active." + "§7Minimum enchantment count set to X mean only X enchantment can be put", + "§7on an item before the conflict is active." ), 0, 255, 0, 1 ); @@ -138,8 +138,8 @@ public class EnchantConflictSubSettingGui extends MappedToListSubSettingGui impl return success; }; - return new ConfirmActionGui("\u00A7cDelete \u00A7e" + CasedStringUtil.snakeToUpperSpacedCase(this.enchantConflict.toString()) + "\u00A7c?", - "\u00A77Confirm that you want to delete this conflict.", + return new ConfirmActionGui("§cDelete §e" + CasedStringUtil.snakeToUpperSpacedCase(this.enchantConflict.toString()) + "§c?", + "§7Confirm that you want to delete this conflict.", this, this.parent, deleteSupplier ); } @@ -160,12 +160,12 @@ public class EnchantConflictSubSettingGui extends MappedToListSubSettingGui impl // Prepare enchantment lore ArrayList enchantLore = new ArrayList<>(); - enchantLore.add("\u00A77Allow you to select a list of \u00A75Enchantments \u00A77that this conflict should include"); + enchantLore.add("§7Allow you to select a list of §5Enchantments §7that this conflict should include"); Set enchants = getSelectedEnchantments(); if (enchants.isEmpty()) { - enchantLore.add("\u00A77There is no included enchantment for this conflict."); + enchantLore.add("§7There is no included enchantment for this conflict."); } else { - enchantLore.add("\u00A77List of included enchantment for this conflict:"); + enchantLore.add("§7List of included enchantment for this conflict:"); Iterator enchantIterator = enchants.iterator(); boolean greaterThanMax = enchants.size() > 5; @@ -173,10 +173,10 @@ public class EnchantConflictSubSettingGui extends MappedToListSubSettingGui impl for (int i = 0; i < maxindex; i++) { // format string like "- Fire Protection" String formattedName = CasedStringUtil.snakeToUpperSpacedCase(enchantIterator.next().getKey().getKey()); - enchantLore.add("\u00A77- \u00A75" + formattedName); + enchantLore.add("§7- §5" + formattedName); } if (greaterThanMax) { - enchantLore.add("\u00A77And " + (enchants.size() - 4) + " more..."); + enchantLore.add("§7And " + (enchants.size() - 4) + " more..."); } } @@ -189,7 +189,7 @@ public class EnchantConflictSubSettingGui extends MappedToListSubSettingGui impl ItemMeta enchantMeta = enchantItem.getItemMeta(); assert enchantMeta != null; - enchantMeta.setDisplayName("\u00A7aSelect included \u00A75Enchantments \u00A7aSettings"); + enchantMeta.setDisplayName("§aSelect included §5Enchantments §aSettings"); enchantMeta.setLore(enchantLore); enchantItem.setItemMeta(enchantMeta); @@ -201,7 +201,7 @@ public class EnchantConflictSubSettingGui extends MappedToListSubSettingGui impl ItemMeta groupMeta = groupItem.getItemMeta(); assert groupMeta != null; - groupMeta.setDisplayName("\u00A7aSelect Excluded \u00A73Groups \u00A7aSettings"); + groupMeta.setDisplayName("§aSelect Excluded §3Groups §aSettings"); groupMeta.setLore(groupLore); groupItem.setItemMeta(groupMeta); diff --git a/src/main/java/xyz/alexcrea/cuanvil/gui/config/list/elements/GroupConfigSubSettingGui.java b/src/main/java/xyz/alexcrea/cuanvil/gui/config/list/elements/GroupConfigSubSettingGui.java index bcf66db..6c41bc3 100644 --- a/src/main/java/xyz/alexcrea/cuanvil/gui/config/list/elements/GroupConfigSubSettingGui.java +++ b/src/main/java/xyz/alexcrea/cuanvil/gui/config/list/elements/GroupConfigSubSettingGui.java @@ -65,8 +65,8 @@ public class GroupConfigSubSettingGui extends MappedToListSubSettingGui implemen ItemStack deleteItem = new ItemStack(Material.RED_TERRACOTTA); ItemMeta deleteMeta = deleteItem.getItemMeta(); - deleteMeta.setDisplayName("\u00A74DELETE GROUP"); - deleteMeta.setLore(Collections.singletonList("\u00A7cCaution with this button !")); + deleteMeta.setDisplayName("§4DELETE GROUP"); + deleteMeta.setLore(Collections.singletonList("§cCaution with this button !")); deleteItem.setItemMeta(deleteMeta); this.pane.bindItem('D', new GuiItem(deleteItem, openGuiAndCheckAction(), CustomAnvil.instance)); @@ -140,8 +140,8 @@ public class GroupConfigSubSettingGui extends MappedToListSubSettingGui implemen return success; }; - return new ConfirmActionGui("\u00A7cDelete \u00A7e" + CasedStringUtil.snakeToUpperSpacedCase(this.group.toString()) + "\u00A7c?", - "\u00A77Confirm that you want to delete this group.", + return new ConfirmActionGui("§cDelete §e" + CasedStringUtil.snakeToUpperSpacedCase(this.group.toString()) + "§c?", + "§7Confirm that you want to delete this group.", this, this.parent, deleteSupplier ); } @@ -151,8 +151,8 @@ public class GroupConfigSubSettingGui extends MappedToListSubSettingGui implemen if(usedLoc.isEmpty()){ return false; } - StringBuilder stb = new StringBuilder("\u00A7cCan't delete group " +this.group.getName()+ - "\n\u00A7eUsed by:"); + StringBuilder stb = new StringBuilder("§cCan't delete group " +this.group.getName()+ + "\n§eUsed by:"); int maxIndex = usedLoc.size(); int nbMore = 0; if(maxIndex > 10){ @@ -160,10 +160,10 @@ public class GroupConfigSubSettingGui extends MappedToListSubSettingGui implemen maxIndex = 9; } for (int i = 0; i < maxIndex; i++) { - stb.append("\n\u00A7r-\u00A7e ").append(usedLoc.get(i)); + stb.append("\n§r-§e ").append(usedLoc.get(i)); } if(nbMore > 0){ - stb.append("\u00A7cAnd ").append(nbMore).append(" More..."); + stb.append("§cAnd ").append(nbMore).append(" More..."); } player.sendMessage(stb.toString()); @@ -214,7 +214,7 @@ public class GroupConfigSubSettingGui extends MappedToListSubSettingGui implemen ItemStack matSelectItem = this.materialSelection.getItem(); ItemMeta matSelectMeta = matSelectItem.getItemMeta(); - matSelectMeta.setDisplayName("\u00A7aSelect included \u00A7eMaterials \u00A7aSettings"); + matSelectMeta.setDisplayName("§aSelect included §eMaterials §aSettings"); matSelectMeta.setLore(matLore); matSelectMeta.addItemFlags(ItemFlag.values()); @@ -226,7 +226,7 @@ public class GroupConfigSubSettingGui extends MappedToListSubSettingGui implemen ItemStack groupSelectItem = this.groupSelection.getItem(); ItemMeta groupSelectMeta = groupSelectItem.getItemMeta(); - groupSelectMeta.setDisplayName("\u00A7aSelect included \u00A73Groups \u00A7aSettings"); + groupSelectMeta.setDisplayName("§aSelect included §3Groups §aSettings"); groupSelectMeta.setLore(groupLore); groupSelectItem.setItemMeta(groupSelectMeta); diff --git a/src/main/java/xyz/alexcrea/cuanvil/gui/config/settings/AbstractSettingGui.java b/src/main/java/xyz/alexcrea/cuanvil/gui/config/settings/AbstractSettingGui.java index c9ce78e..0336438 100644 --- a/src/main/java/xyz/alexcrea/cuanvil/gui/config/settings/AbstractSettingGui.java +++ b/src/main/java/xyz/alexcrea/cuanvil/gui/config/settings/AbstractSettingGui.java @@ -17,7 +17,7 @@ import xyz.alexcrea.cuanvil.gui.util.GuiGlobalItems; */ public abstract class AbstractSettingGui extends ChestGui implements SettingGui { - protected static final String CLICK_LORE = "\u00A77Click Here to change the value"; + protected static final String CLICK_LORE = "§7Click Here to change the value"; private PatternPane pane; diff --git a/src/main/java/xyz/alexcrea/cuanvil/gui/config/settings/BoolSettingsGui.java b/src/main/java/xyz/alexcrea/cuanvil/gui/config/settings/BoolSettingsGui.java index bb058c6..da37d8d 100644 --- a/src/main/java/xyz/alexcrea/cuanvil/gui/config/settings/BoolSettingsGui.java +++ b/src/main/java/xyz/alexcrea/cuanvil/gui/config/settings/BoolSettingsGui.java @@ -66,9 +66,9 @@ public class BoolSettingsGui extends AbstractSettingGui { // Prepare default Value text String defaultValueLore; if(holder.defaultVal){ - defaultValueLore = "\u00A7aYes \u00A77Is the default value"; + defaultValueLore = "§aYes §7Is the default value"; }else{ - defaultValueLore = "\u00A7cNo \u00A77Is the default value"; + defaultValueLore = "§cNo §7Is the default value"; } // Create reset to default item @@ -76,7 +76,7 @@ public class BoolSettingsGui extends AbstractSettingGui { ItemMeta meta = item.getItemMeta(); assert meta != null; - meta.setDisplayName("\u00A7eReset to default value"); + meta.setDisplayName("§eReset to default value"); meta.setLore(Collections.singletonList(defaultValueLore)); item.setItemMeta(meta); returnToDefault = new GuiItem(item, event -> { @@ -97,10 +97,10 @@ public class BoolSettingsGui extends AbstractSettingGui { String displayedName; Material displayedMat; if (now) { - displayedName = "\u00A7aYes"; + displayedName = "§aYes"; displayedMat = Material.GREEN_TERRACOTTA; } else { - displayedName = "\u00A7cNo"; + displayedName = "§cNo"; displayedMat = Material.RED_TERRACOTTA; } @@ -254,14 +254,14 @@ public class BoolSettingsGui extends AbstractSettingGui { boolean value = getConfiguredValue(); Material itemMat; - StringBuilder itemName = new StringBuilder("\u00A7e"); + StringBuilder itemName = new StringBuilder("§e"); String finalValue; if (value) { itemMat = Material.GREEN_TERRACOTTA; - finalValue = "\u00A7aYes"; + finalValue = "§aYes"; } else { itemMat = Material.RED_TERRACOTTA; - finalValue = "\u00A7cNo"; + finalValue = "§cNo"; } itemName.append(name); diff --git a/src/main/java/xyz/alexcrea/cuanvil/gui/config/settings/DoubleSettingGui.java b/src/main/java/xyz/alexcrea/cuanvil/gui/config/settings/DoubleSettingGui.java index 6ff7469..813567d 100644 --- a/src/main/java/xyz/alexcrea/cuanvil/gui/config/settings/DoubleSettingGui.java +++ b/src/main/java/xyz/alexcrea/cuanvil/gui/config/settings/DoubleSettingGui.java @@ -68,9 +68,9 @@ public class DoubleSettingGui extends AbstractSettingGui { ItemMeta meta = DELETE_ITEM_STACK.getItemMeta(); assert meta != null; - meta.setDisplayName("\u00A7cDisable item being repaired ?"); - meta.setLore(Arrays.asList("\u00A77Confirm disabling unit repair for this item..", - "\u00A74Cation: This action can't be canceled.")); + meta.setDisplayName("§cDisable item being repaired ?"); + meta.setLore(Arrays.asList("§7Confirm disabling unit repair for this item..", + "§4Cation: This action can't be canceled.")); DELETE_ITEM_STACK.setItemMeta(meta); } @@ -121,8 +121,8 @@ public class DoubleSettingGui extends AbstractSettingGui { ItemMeta meta = item.getItemMeta(); assert meta != null; - meta.setDisplayName("\u00A7eReset to default value"); - meta.setLore(Collections.singletonList("\u00A77Default value is \u00A7e" + displayValue(holder.defaultVal))); + meta.setDisplayName("§eReset to default value"); + meta.setLore(Collections.singletonList("§7Default value is §e" + displayValue(holder.defaultVal))); item.setItemMeta(meta); returnToDefault = new GuiItem(item, event -> { event.setCancelled(true); @@ -144,7 +144,7 @@ public class DoubleSettingGui extends AbstractSettingGui { if (now.compareTo(holder.min) > 0) { BigDecimal planned = holder.min.max(now.subtract(step)); - minusItem = getSetValueItem(Material.RED_TERRACOTTA, planned, "\u00A7c-"); + minusItem = getSetValueItem(Material.RED_TERRACOTTA, planned, "§c-"); } else { minusItem = GuiGlobalItems.backgroundItem(Material.BARRIER); } @@ -155,7 +155,7 @@ public class DoubleSettingGui extends AbstractSettingGui { if (now.compareTo(holder.max) < 0) { BigDecimal planned = holder.max.min(now.add(step)); - plusItem = getSetValueItem(Material.GREEN_TERRACOTTA, planned, "\u00A7a+"); + plusItem = getSetValueItem(Material.GREEN_TERRACOTTA, planned, "§a+"); } else { plusItem = GuiGlobalItems.backgroundItem(Material.BARRIER); } @@ -166,7 +166,7 @@ public class DoubleSettingGui extends AbstractSettingGui { ItemMeta resultMeta = resultPaper.getItemMeta(); assert resultMeta != null; - resultMeta.setDisplayName("\u00A7fValue: \u00A7e" + displayValue(now)); + resultMeta.setDisplayName("§fValue: §e" + displayValue(now)); resultPaper.setItemMeta(resultMeta); GuiItem resultItem = new GuiItem(resultPaper, GuiGlobalActions.stayInPlace, CustomAnvil.instance); @@ -197,8 +197,8 @@ public class DoubleSettingGui extends AbstractSettingGui { ItemMeta meta = item.getItemMeta(); assert meta != null; - meta.setDisplayName("\u00A7e" + displayValue(now) + " \u00A7f-> \u00A7e" + displayValue(planned) - + " \u00A7r(" + numberPrefix + (displayValue(planned.subtract(now).abs()) + "\u00A7r)")); + meta.setDisplayName("§e" + displayValue(now) + " §f-> §e" + displayValue(planned) + + " §r(" + numberPrefix + (displayValue(planned.subtract(now).abs()) + "§r)")); meta.setLore(setLoreItem); item.setItemMeta(meta); @@ -271,21 +271,21 @@ public class DoubleSettingGui extends AbstractSettingGui { // Get material properties Material stepMat; - StringBuilder stepName = new StringBuilder("\u00A7"); + StringBuilder stepName = new StringBuilder("§"); List stepLore; Consumer clickEvent; if (stepValue.compareTo(step) == 0) { stepMat = Material.GREEN_STAINED_GLASS_PANE; stepName.append('a'); - stepLore = Collections.singletonList("\u00A77Value is changing by " + displayValue(stepValue)); + stepLore = Collections.singletonList("§7Value is changing by " + displayValue(stepValue)); clickEvent = GuiGlobalActions.stayInPlace; } else { stepMat = Material.RED_STAINED_GLASS_PANE; stepName.append('c'); - stepLore = Collections.singletonList("\u00A77Click here to change the value by " + displayValue(stepValue)); + stepLore = Collections.singletonList("§7Click here to change the value by " + displayValue(stepValue)); clickEvent = updateStepValue(stepValue); } - stepName.append("Step of \u00A7e").append(displayValue(stepValue)); + stepName.append("Step of §e").append(displayValue(stepValue)); // Create item stack then gui item ItemStack item = new ItemStack(stepMat); @@ -487,10 +487,10 @@ public class DoubleSettingGui extends AbstractSettingGui { public GuiItem getItem(Material itemMat, String name){ // Get item properties BigDecimal value = getConfiguredValue(); - StringBuilder itemName = new StringBuilder("\u00A7a").append(name); + StringBuilder itemName = new StringBuilder("§a").append(name); return GuiGlobalItems.createGuiItemFromProperties(this, itemMat, itemName, - "\u00A7e" + displayValue(value, this.asPercentage), + "§e" + displayValue(value, this.asPercentage), this.displayLore, true); } diff --git a/src/main/java/xyz/alexcrea/cuanvil/gui/config/settings/EnchantCostSettingsGui.java b/src/main/java/xyz/alexcrea/cuanvil/gui/config/settings/EnchantCostSettingsGui.java index f347588..b0997cb 100644 --- a/src/main/java/xyz/alexcrea/cuanvil/gui/config/settings/EnchantCostSettingsGui.java +++ b/src/main/java/xyz/alexcrea/cuanvil/gui/config/settings/EnchantCostSettingsGui.java @@ -83,10 +83,10 @@ public class EnchantCostSettingsGui extends IntSettingsGui { ItemMeta bookMeta = bookItemstack.getItemMeta(); assert bookMeta != null; - bookMeta.setDisplayName("\u00A7aCost of an Enchantment by Book"); + bookMeta.setDisplayName("§aCost of an Enchantment by Book"); bookMeta.setLore(Arrays.asList( - "\u00A77Cost per result item level of an sacrifice enchantment", - "\u00A77Only apply if sacrificed item \u00A7cis \u00A77a book")); + "§7Cost per result item level of an sacrifice enchantment", + "§7Only apply if sacrificed item §cis §7a book")); bookItemstack.setItemMeta(bookMeta); // sword display @@ -95,10 +95,10 @@ public class EnchantCostSettingsGui extends IntSettingsGui { assert swordMeta != null; swordMeta.addItemFlags(ItemFlag.values()); - swordMeta.setDisplayName("\u00A7aCost of an Enchantment by Item"); + swordMeta.setDisplayName("§aCost of an Enchantment by Item"); swordMeta.setLore(Arrays.asList( - "\u00A77Cost per result item level of an sacrifice enchantment", - "\u00A77Only apply if sacrificed item \u00A7cis not \u00A77a book")); + "§7Cost per result item level of an sacrifice enchantment", + "§7Only apply if sacrificed item §cis not §7a book")); swordItemstack.setItemMeta(swordMeta); pane.bindItem('1', GuiGlobalItems.backgroundItem(Material.BLACK_STAINED_GLASS_PANE)); @@ -115,10 +115,10 @@ public class EnchantCostSettingsGui extends IntSettingsGui { // assume holder is an instance of EnchantCostSettingFactory EnchantCostSettingFactory holder = (EnchantCostSettingFactory) this.holder; - meta.setDisplayName("\u00A7eReset to default value"); + meta.setDisplayName("§eReset to default value"); meta.setLore(Arrays.asList( - "\u00A77Default item value is: \u00A7e" + holder.defaultVal, - "\u00A77Default book value is: \u00A7e" + holder.defaultBookVal)); + "§7Default item value is: §e" + holder.defaultVal, + "§7Default book value is: §e" + holder.defaultBookVal)); item.setItemMeta(meta); returnToDefault = new GuiItem(item, event -> { event.setCancelled(true); @@ -147,7 +147,7 @@ public class EnchantCostSettingsGui extends IntSettingsGui { ItemMeta meta = item.getItemMeta(); assert meta != null; - meta.setDisplayName("\u00A7e" + nowBook + " \u00A7f-> \u00A7e" + planned + " \u00A7r(\u00A7c-" + (nowBook - planned) + "\u00A7r)"); + meta.setDisplayName("§e" + nowBook + " §f-> §e" + planned + " §r(§c-" + (nowBook - planned) + "§r)"); meta.setLore(Collections.singletonList(AbstractSettingGui.CLICK_LORE)); item.setItemMeta(meta); @@ -165,7 +165,7 @@ public class EnchantCostSettingsGui extends IntSettingsGui { ItemMeta meta = item.getItemMeta(); assert meta != null; - meta.setDisplayName("\u00A7e" + nowBook + " \u00A7f-> \u00A7e" + planned + " \u00A7r(\u00A7a+" + (planned - nowBook) + "\u00A7r)"); + meta.setDisplayName("§e" + nowBook + " §f-> §e" + planned + " §r(§a+" + (planned - nowBook) + "§r)"); meta.setLore(Collections.singletonList(AbstractSettingGui.CLICK_LORE)); item.setItemMeta(meta); @@ -180,7 +180,7 @@ public class EnchantCostSettingsGui extends IntSettingsGui { ItemMeta nowMeta = nowPaper.getItemMeta(); assert nowMeta != null; - nowMeta.setDisplayName("\u00A7fValue: \u00A7e" + nowBook); + nowMeta.setDisplayName("§fValue: §e" + nowBook); if(!holder.displayLore.isEmpty()){ nowMeta.setLore(holder.displayLore); } diff --git a/src/main/java/xyz/alexcrea/cuanvil/gui/config/settings/EnchantSelectSettingGui.java b/src/main/java/xyz/alexcrea/cuanvil/gui/config/settings/EnchantSelectSettingGui.java index 2c50042..71a31d9 100644 --- a/src/main/java/xyz/alexcrea/cuanvil/gui/config/settings/EnchantSelectSettingGui.java +++ b/src/main/java/xyz/alexcrea/cuanvil/gui/config/settings/EnchantSelectSettingGui.java @@ -107,9 +107,9 @@ public class EnchantSelectSettingGui extends SettingGuiListConfigGui TRUE_LORE = Collections.singletonList("\u00A77Value: \u00A7aSelected"); - private static final List FALSE_LORE = Collections.singletonList("\u00A77Value: \u00A7cNot Selected"); + private static final List TRUE_LORE = Collections.singletonList("§7Value: §aSelected"); + private static final List FALSE_LORE = Collections.singletonList("§7Value: §cNot Selected"); public void setEnchantItemMeta(ItemStack item, String name, boolean isIn) { ItemMeta meta = item.getItemMeta(); @@ -138,7 +138,7 @@ public class EnchantSelectSettingGui extends SettingGuiListConfigGui TRUE_LORE = Collections.singletonList("\u00A77Value: \u00A7aSelected"); - private static final List FALSE_LORE = Collections.singletonList("\u00A77Value: \u00A7cNot Selected"); + private static final List TRUE_LORE = Collections.singletonList("§7Value: §aSelected"); + private static final List FALSE_LORE = Collections.singletonList("§7Value: §cNot Selected"); public void setGroupItemMeta(ItemStack item, String name, boolean isIn) { ItemMeta meta = item.getItemMeta(); @@ -105,7 +105,7 @@ public class GroupSelectSettingGui extends AbstractSettingGui { assert meta != null; } - meta.setDisplayName("\u00A7" + (isIn ? 'a' : 'c') + CasedStringUtil.snakeToUpperSpacedCase(name)); + meta.setDisplayName("§" + (isIn ? 'a' : 'c') + CasedStringUtil.snakeToUpperSpacedCase(name)); if (isIn) { meta.addEnchant(Enchantment.DAMAGE_UNDEAD, 1, true); meta.setLore(TRUE_LORE); diff --git a/src/main/java/xyz/alexcrea/cuanvil/gui/config/settings/IntSettingsGui.java b/src/main/java/xyz/alexcrea/cuanvil/gui/config/settings/IntSettingsGui.java index 389546b..8a9059f 100644 --- a/src/main/java/xyz/alexcrea/cuanvil/gui/config/settings/IntSettingsGui.java +++ b/src/main/java/xyz/alexcrea/cuanvil/gui/config/settings/IntSettingsGui.java @@ -71,8 +71,8 @@ public class IntSettingsGui extends AbstractSettingGui { ItemMeta meta = item.getItemMeta(); assert meta != null; - meta.setDisplayName("\u00A7eReset to default value"); - meta.setLore(Collections.singletonList("\u00A77Default value is \u00A7e" + holder.defaultVal)); + meta.setDisplayName("§eReset to default value"); + meta.setLore(Collections.singletonList("§7Default value is §e" + holder.defaultVal)); item.setItemMeta(meta); returnToDefault = new GuiItem(item, event -> { event.setCancelled(true); @@ -97,7 +97,7 @@ public class IntSettingsGui extends AbstractSettingGui { ItemMeta meta = item.getItemMeta(); assert meta != null; - meta.setDisplayName("\u00A7e" + now + " \u00A7f-> \u00A7e" + planned + " \u00A7r(\u00A7c-" + (now - planned) + "\u00A7r)"); + meta.setDisplayName("§e" + now + " §f-> §e" + planned + " §r(§c-" + (now - planned) + "§r)"); meta.setLore(Collections.singletonList(AbstractSettingGui.CLICK_LORE)); item.setItemMeta(meta); @@ -116,7 +116,7 @@ public class IntSettingsGui extends AbstractSettingGui { ItemMeta meta = item.getItemMeta(); assert meta != null; - meta.setDisplayName("\u00A7e" + now + " \u00A7f-> \u00A7e" + planned + " \u00A7r(\u00A7a+" + (planned - now) + "\u00A7r)"); + meta.setDisplayName("§e" + now + " §f-> §e" + planned + " §r(§a+" + (planned - now) + "§r)"); meta.setLore(Collections.singletonList(AbstractSettingGui.CLICK_LORE)); item.setItemMeta(meta); @@ -131,7 +131,7 @@ public class IntSettingsGui extends AbstractSettingGui { ItemMeta resultMeta = resultPaper.getItemMeta(); assert resultMeta != null; - resultMeta.setDisplayName("\u00A7fValue: \u00A7e" + now); + resultMeta.setDisplayName("§fValue: §e" + now); resultMeta.setLore(holder.displayLore); resultPaper.setItemMeta(resultMeta); @@ -218,21 +218,21 @@ public class IntSettingsGui extends AbstractSettingGui { // Get material properties Material stepMat; - StringBuilder stepName = new StringBuilder("\u00A7"); + StringBuilder stepName = new StringBuilder("§"); List stepLore; Consumer clickEvent; if (stepValue == step) { stepMat = Material.GREEN_STAINED_GLASS_PANE; stepName.append('a'); - stepLore = Collections.singletonList("\u00A77Value is changing by " + stepValue); + stepLore = Collections.singletonList("§7Value is changing by " + stepValue); clickEvent = GuiGlobalActions.stayInPlace; } else { stepMat = Material.RED_STAINED_GLASS_PANE; stepName.append('c'); - stepLore = Collections.singletonList("\u00A77Click here to change the value by " + stepValue); + stepLore = Collections.singletonList("§7Click here to change the value by " + stepValue); clickEvent = updateStepValue(stepValue); } - stepName.append("Step of: \u00A7e").append(stepValue); + stepName.append("Step of: §e").append(stepValue); // Create item stack then gui item ItemStack item = new ItemStack(stepMat); @@ -393,10 +393,10 @@ public class IntSettingsGui extends AbstractSettingGui { ) { // Get item properties int value = getConfiguredValue(); - StringBuilder itemName = new StringBuilder("\u00A7a").append(name); + StringBuilder itemName = new StringBuilder("§a").append(name); return GuiGlobalItems.createGuiItemFromProperties(this, itemMat, itemName, - "\u00A7e" + value, + "§e" + value, this.displayLore, true); } diff --git a/src/main/java/xyz/alexcrea/cuanvil/gui/config/settings/ItemSettingGui.java b/src/main/java/xyz/alexcrea/cuanvil/gui/config/settings/ItemSettingGui.java index e49daa7..80f697b 100644 --- a/src/main/java/xyz/alexcrea/cuanvil/gui/config/settings/ItemSettingGui.java +++ b/src/main/java/xyz/alexcrea/cuanvil/gui/config/settings/ItemSettingGui.java @@ -77,8 +77,8 @@ public class ItemSettingGui extends AbstractSettingGui { ItemMeta meta = item.getItemMeta(); assert meta != null; - meta.setDisplayName("\u00A7eReset to default value"); - meta.setLore(Collections.singletonList("\u00A77Default value is \u00A7e" + holder.defaultVal)); + meta.setDisplayName("§eReset to default value"); + meta.setLore(Collections.singletonList("§7Default value is §e" + holder.defaultVal)); item.setItemMeta(meta); returnToDefault = new GuiItem(item, event -> { event.setCancelled(true); @@ -88,7 +88,7 @@ public class ItemSettingGui extends AbstractSettingGui { }, CustomAnvil.instance); } - protected final static List CLICK_LORE = Collections.singletonList("\u00A77Click Here with an item to change the value"); + protected final static List CLICK_LORE = Collections.singletonList("§7Click Here with an item to change the value"); /** * Update item using the setting value to match the new value @@ -105,7 +105,7 @@ public class ItemSettingGui extends AbstractSettingGui { ItemMeta valueMeta = displayedItem.getItemMeta(); assert valueMeta != null; - valueMeta.setDisplayName("\u00A74NO ITEM SET"); + valueMeta.setDisplayName("§4NO ITEM SET"); valueMeta.setLore(CLICK_LORE); displayedItem.setItemMeta(valueMeta); @@ -266,7 +266,7 @@ public class ItemSettingGui extends AbstractSettingGui { ItemMeta meta = item.getItemMeta(); assert meta != null; - meta.setDisplayName("\u00A7a" + name); + meta.setDisplayName("§a" + name); meta.setLore(getDisplayLore()); meta.addItemFlags(ItemFlag.values()); diff --git a/src/main/java/xyz/alexcrea/cuanvil/gui/config/settings/MaterialSelectSettingGui.java b/src/main/java/xyz/alexcrea/cuanvil/gui/config/settings/MaterialSelectSettingGui.java index 7998548..9d10d59 100644 --- a/src/main/java/xyz/alexcrea/cuanvil/gui/config/settings/MaterialSelectSettingGui.java +++ b/src/main/java/xyz/alexcrea/cuanvil/gui/config/settings/MaterialSelectSettingGui.java @@ -85,10 +85,10 @@ public class MaterialSelectSettingGui extends MappedElementListConfigGui { removeMaterial(material); diff --git a/src/main/java/xyz/alexcrea/cuanvil/gui/util/GuiGlobalActions.java b/src/main/java/xyz/alexcrea/cuanvil/gui/util/GuiGlobalActions.java index d18d170..694fa14 100644 --- a/src/main/java/xyz/alexcrea/cuanvil/gui/util/GuiGlobalActions.java +++ b/src/main/java/xyz/alexcrea/cuanvil/gui/util/GuiGlobalActions.java @@ -133,7 +133,7 @@ public class GuiGlobalActions { // Save setting if (!setting.onSave()) { - player.sendMessage("\u00A7cSomething went wrong while saving the change of value."); + player.sendMessage("§cSomething went wrong while saving the change of value."); } // Update gui for those who have it open. goal.updateGuiValues(); diff --git a/src/main/java/xyz/alexcrea/cuanvil/gui/util/GuiGlobalItems.java b/src/main/java/xyz/alexcrea/cuanvil/gui/util/GuiGlobalItems.java index 2eb42e3..79f1462 100644 --- a/src/main/java/xyz/alexcrea/cuanvil/gui/util/GuiGlobalItems.java +++ b/src/main/java/xyz/alexcrea/cuanvil/gui/util/GuiGlobalItems.java @@ -30,7 +30,7 @@ public class GuiGlobalItems { ItemMeta meta = BACK_ITEM.getItemMeta(); assert meta != null; - meta.setDisplayName("\u00A7cBack"); + meta.setDisplayName("§cBack"); BACK_ITEM.setItemMeta(meta); } @@ -82,7 +82,7 @@ public class GuiGlobalItems { ItemMeta meta = item.getItemMeta(); assert meta != null; - meta.setDisplayName("\u00A7c"); + meta.setDisplayName("§c"); item.setItemMeta(meta); return new GuiItem(item, GuiGlobalActions.stayInPlace, CustomAnvil.instance); } @@ -139,7 +139,7 @@ public class GuiGlobalItems { ItemMeta meta = item.getItemMeta(); assert meta != null; - meta.setDisplayName("\u00A7aSave"); + meta.setDisplayName("§aSave"); item.setItemMeta(meta); return new GuiItem(item, GuiGlobalActions.saveSettingAction(setting, goal), @@ -154,7 +154,7 @@ public class GuiGlobalItems { ItemMeta meta = item.getItemMeta(); assert meta != null; - meta.setDisplayName("\u00A77No change. can't save."); + meta.setDisplayName("§7No change. can't save."); item.setItemMeta(meta); NO_CHANGE_ITEM = new GuiItem(item, GuiGlobalActions.stayInPlace, CustomAnvil.instance); } @@ -185,7 +185,7 @@ public class GuiGlobalItems { } // Prefix of the one line lore that will be added to setting's item. - public static final String SETTING_ITEM_LORE_PREFIX = "\u00A77value: "; + public static final String SETTING_ITEM_LORE_PREFIX = "§7value: "; /** * Create an arbitrary GuiItem from a unique setting and item's property. @@ -247,8 +247,8 @@ public class GuiGlobalItems { ItemMeta meta = item.getItemMeta(); assert meta != null; - meta.setDisplayName("\u00A7eTemporary close this menu"); - meta.setLore(Collections.singletonList("\u00A77Allow you to chose other item then return here.")); + meta.setDisplayName("§eTemporary close this menu"); + meta.setLore(Collections.singletonList("§7Allow you to chose other item then return here.")); item.setItemMeta(meta); return new GuiItem(item, event -> { @@ -263,7 +263,7 @@ public class GuiGlobalItems { }); - player.sendMessage("\u00A7eWrite something in chat to return to the item config menu."); + player.sendMessage("§eWrite something in chat to return to the item config menu."); player.closeInventory(); }, CustomAnvil.instance); } diff --git a/src/main/java/xyz/alexcrea/cuanvil/gui/util/GuiSharedConstant.java b/src/main/java/xyz/alexcrea/cuanvil/gui/util/GuiSharedConstant.java index c2bccf9..f5b8a2e 100644 --- a/src/main/java/xyz/alexcrea/cuanvil/gui/util/GuiSharedConstant.java +++ b/src/main/java/xyz/alexcrea/cuanvil/gui/util/GuiSharedConstant.java @@ -53,25 +53,25 @@ public class GuiSharedConstant { ItemMeta meta = CANCEL_ITEM.getItemMeta(); assert meta != null; - meta.setDisplayName("\u00A7cCancel"); - meta.setLore(Collections.singletonList("\u00A77Cancel current action and return to previous menu.")); + meta.setDisplayName("§cCancel"); + meta.setLore(Collections.singletonList("§7Cancel current action and return to previous menu.")); CANCEL_ITEM.setItemMeta(meta); CONFIRM_ITEM = new ItemStack(Material.GREEN_TERRACOTTA); meta = CONFIRM_ITEM.getItemMeta(); assert meta != null; - meta.setDisplayName("\u00A7aConfirm"); - meta.setLore(Collections.singletonList("\u00A77Confirm current action.")); + meta.setDisplayName("§aConfirm"); + meta.setLore(Collections.singletonList("§7Confirm current action.")); CONFIRM_ITEM.setItemMeta(meta); CONFIRM_PERMANENT_ITEM = new ItemStack(Material.GREEN_TERRACOTTA); meta = CONFIRM_PERMANENT_ITEM.getItemMeta(); assert meta != null; - meta.setDisplayName("\u00A7aConfirm"); - meta.setLore(Arrays.asList("\u00A77Confirm current action.", - "\u00A74Cation: This action can't be canceled.")); + meta.setDisplayName("§aConfirm"); + meta.setLore(Arrays.asList("§7Confirm current action.", + "§4Cation: This action can't be canceled.")); CONFIRM_PERMANENT_ITEM.setItemMeta(meta); }