mirror of
https://github.com/ChestShop-authors/ChestShop-3.git
synced 2025-01-23 07:11:20 +01:00
Fix /iteminfo coloring
This commit is contained in:
parent
432c505806
commit
0c1b82c9d8
@ -44,7 +44,7 @@ public class ItemInfo implements CommandExecutor {
|
||||
return false;
|
||||
}
|
||||
|
||||
sender.sendMessage(iteminfo);
|
||||
sender.sendMessage(replace(iteminfo));
|
||||
try {
|
||||
sender.sendMessage(replace(iteminfo_fullname, "item", MaterialUtil.getName(item)));
|
||||
} catch (IllegalArgumentException e) {
|
||||
@ -54,7 +54,7 @@ public class ItemInfo implements CommandExecutor {
|
||||
}
|
||||
|
||||
try {
|
||||
sender.sendMessage(Messages.replace(iteminfo_shopname, "item", MaterialUtil.getSignName(item)));
|
||||
sender.sendMessage(replace(iteminfo_shopname, "item", MaterialUtil.getSignName(item)));
|
||||
} catch (IllegalArgumentException e) {
|
||||
sender.sendMessage(ChatColor.RED + "Error while generating shop sign name. Please contact an admin or take a look at the console/log!");
|
||||
ChestShop.getPlugin().getLogger().log(Level.SEVERE, "Error while generating shop sign item name", e);
|
||||
|
@ -104,6 +104,6 @@ public class Messages {
|
||||
for (int i = 0; i + 1 < replacements.length; i+=2) {
|
||||
message = message.replace("%" + replacements[i], replacements[i+1]);
|
||||
}
|
||||
return message;
|
||||
return Configuration.getColoured(message);
|
||||
}
|
||||
}
|
||||
|
@ -121,7 +121,7 @@ public class ItemInfoListener implements Listener {
|
||||
public static void addLoreInfo(ItemInfoEvent event) {
|
||||
ItemMeta meta = event.getItem().getItemMeta();
|
||||
if (meta.hasLore()) {
|
||||
event.getSender().sendMessage(Messages.replace(iteminfo_lore, "lore", String.join("\n", meta.getLore())));
|
||||
event.getSender().sendMessage(replace(iteminfo_lore, "lore", String.join("\n", meta.getLore())));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user