mirror of
https://github.com/plexusorg/ItemizerX.git
synced 2024-11-13 00:13:33 +00:00
Fixed a NPE where an attribute name would start with minecraft:
This commit is contained in:
parent
d806ad56f2
commit
7254ddcce3
@ -34,7 +34,7 @@ public enum Attributes
|
||||
{
|
||||
for (Attributes attr : values())
|
||||
{
|
||||
if (attr.name().equalsIgnoreCase(name) || attr.mcName.equalsIgnoreCase(name))
|
||||
if (attr.name().equalsIgnoreCase(name) || attr.mcName.equalsIgnoreCase(name.replace("minecraft:", "")))
|
||||
{
|
||||
return attr;
|
||||
}
|
||||
|
@ -295,7 +295,7 @@ public class ItemizerXCommand implements CommandExecutor, ItemizerXBase
|
||||
lores.set(index - 1, lore);
|
||||
meta.lore(lores);
|
||||
item.setItemMeta(meta);
|
||||
sender.sendMessage(mm.deserialize("<dark_gree>Line <white>'" + index + "' <dark_green>has been changed to <white>'" + mm.serialize(lore) + "<white>'"));
|
||||
sender.sendMessage(mm.deserialize("<dark_green>Line <white>'" + index + "' <dark_green>has been changed to <white>'" + mm.serialize(lore) + "<white>'"));
|
||||
return true;
|
||||
}
|
||||
case "clear" ->
|
||||
|
Loading…
Reference in New Issue
Block a user