Skip to content

Commit

Permalink
fix itemhidden compat with old syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed May 19, 2020
1 parent 8c80019 commit f57f345
Showing 1 changed file with 3 additions and 2 deletions.
Expand Up @@ -130,14 +130,15 @@ public void adjust(Mechanism mechanism) {
meta.removeItemFlags(ItemFlag.values());
ListTag new_hides = mechanism.valueAsType(ListTag.class);
for (String str : new_hides) {
str = str.toUpperCase();
if (!str.startsWith("HIDE_")) {
str = "HIDE_" + str;
}
if (str.equalsIgnoreCase("HIDE_ALL")) {
if (str.equals("HIDE_ALL")) {
meta.addItemFlags(ItemFlag.values());
}
else {
meta.addItemFlags(ItemFlag.valueOf(str.toUpperCase()));
meta.addItemFlags(ItemFlag.valueOf(str));
}
}
item.getItemStack().setItemMeta(meta);
Expand Down

0 comments on commit f57f345

Please sign in to comment.