translate colors for editor menu items that were just created

This commit is contained in:
xsmeths 2024-04-15 00:18:00 +01:00
parent 2a74183821
commit fc0e3ef7c0

View File

@ -29,7 +29,7 @@ public class VoucherMenu extends IconInv {
if (getInventory().firstEmpty() != -1) { if (getInventory().firstEmpty() != -1) {
ItemStack voucherr = voucher.toItemStack(); ItemStack voucherr = voucher.toItemStack();
ItemMeta vouchermeta = voucherr.getItemMeta(); ItemMeta vouchermeta = voucherr.getItemMeta();
vouchermeta.setDisplayName(voucher.getName()); vouchermeta.setDisplayName(ChatColor.translateAlternateColorCodes('&', voucher.getName()));
voucherr.setItemMeta(vouchermeta); voucherr.setItemMeta(vouchermeta);
addIcon(getInventory().firstEmpty(), voucherr, event -> new OptionMenu(instance, voucher).open(event.getPlayer())); addIcon(getInventory().firstEmpty(), voucherr, event -> new OptionMenu(instance, voucher).open(event.getPlayer()));
} }