mirror of
https://gitlab.com/phoenix-dvpmt/mmoitems.git
synced 2025-01-05 06:57:35 +01:00
Fixed minor MMOItemsCommand issues
fixed mistake in last commit & some wrong formatting of characters
This commit is contained in:
parent
8e5fe8df7b
commit
faaf58b62b
@ -87,8 +87,8 @@ public class MMOItemsCommand implements CommandExecutor {
|
|||||||
|
|
||||||
if (args.length < 2) {
|
if (args.length < 2) {
|
||||||
new ItemBrowser((Player) sender).open();
|
new ItemBrowser((Player) sender).open();
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!Type.isValid(args[1])) {
|
if (!Type.isValid(args[1])) {
|
||||||
sender.sendMessage(MMOItems.plugin.getPrefix() + ChatColor.RED + "Please specify a valid item type.");
|
sender.sendMessage(MMOItems.plugin.getPrefix() + ChatColor.RED + "Please specify a valid item type.");
|
||||||
return true;
|
return true;
|
||||||
@ -592,11 +592,11 @@ public class MMOItemsCommand implements CommandExecutor {
|
|||||||
if (MMOItems.plugin.getVersion().getDurabilityHandler().isDamaged(item, item.getItemMeta()))
|
if (MMOItems.plugin.getVersion().getDurabilityHandler().isDamaged(item, item.getItemMeta()))
|
||||||
config.getConfig().set(name + ".durability", MMOItems.plugin.getVersion().getDurabilityHandler().getDurability(item, item.getItemMeta()));
|
config.getConfig().set(name + ".durability", MMOItems.plugin.getVersion().getDurabilityHandler().getDurability(item, item.getItemMeta()));
|
||||||
if (item.getItemMeta().hasDisplayName())
|
if (item.getItemMeta().hasDisplayName())
|
||||||
config.getConfig().set(name + ".name", item.getItemMeta().getDisplayName().replace("<EFBFBD>", "&"));
|
config.getConfig().set(name + ".name", item.getItemMeta().getDisplayName().replace("§", "&"));
|
||||||
if (item.getItemMeta().hasLore()) {
|
if (item.getItemMeta().hasLore()) {
|
||||||
List<String> lore = new ArrayList<>();
|
List<String> lore = new ArrayList<>();
|
||||||
for (String line : item.getItemMeta().getLore())
|
for (String line : item.getItemMeta().getLore())
|
||||||
lore.add(line.replace("<EFBFBD>", "&"));
|
lore.add(line.replace("§", "&"));
|
||||||
config.getConfig().set(name + ".lore", lore);
|
config.getConfig().set(name + ".lore", lore);
|
||||||
}
|
}
|
||||||
if (item.getItemMeta().hasItemFlag(ItemFlag.HIDE_ENCHANTS))
|
if (item.getItemMeta().hasItemFlag(ItemFlag.HIDE_ENCHANTS))
|
||||||
|
Loading…
Reference in New Issue
Block a user