Skip to content

Commit

Permalink
v1.3.5.2
Browse files Browse the repository at this point in the history
  • Loading branch information
byteful committed Nov 15, 2023
1 parent be8ec23 commit f95f586
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,14 @@ public PDCLevelToolsItem(@NotNull ItemStack stack) {
public @NotNull ItemStack getItemStack() {
final ItemStack stack = LevelToolsUtil.buildItemStack(this.stack, enchantments, getLevel(), getXp(), getMaxXp());

final ItemMeta meta = stack.getItemMeta();
assert meta != null : "ItemMeta is null! Should not happen.";
attributes.forEach((attribute, modifier) -> {
final ItemMeta meta = stack.getItemMeta();
assert meta != null : "ItemMeta is null! Should not happen.";

final Attribute attr = Attribute.valueOf(attribute.replace(".", "_").toUpperCase(Locale.ROOT).trim());
final AttributeModifier mod = new AttributeModifier(attribute, modifier, AttributeModifier.Operation.ADD_NUMBER);
meta.addAttributeModifier(attr, mod);
stack.setItemMeta(meta);
});
stack.setItemMeta(meta);

return stack;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,7 @@ public static void handleReward(LevelToolsItem tool, Player player) {
}
});
}
tool.setLastHandledReward(keyNum);

return;
}
Expand Down

0 comments on commit f95f586

Please sign in to comment.