Skip to content

Commit

Permalink
Nexo Compatibility: Override Nexo attack speed to prevent duplication
Browse files Browse the repository at this point in the history
This is a bit of a messy fix in that we're explicitly overriding the value provided by other plugins. Ideally, we should only be overriding our own values instead of all of them universally, but that will require a decent amount of additional work
  • Loading branch information
Travja committed Jan 26, 2025
1 parent 33c77ae commit 7558cef
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ private static void addAttribute(@NotNull ItemStack item,
AttributeModifier am =
new AttributeModifier(att.getUUID(slot), att.getNmsName(), value, Operation.ADD_NUMBER, slot);

meta.removeAttributeModifier(att.getAttribute(), am); // Avoid dupe and error
meta.removeAttributeModifier(att.getAttribute()); // Avoid dupe and error
meta.addAttributeModifier(att.getAttribute(), am);
}
item.setItemMeta(meta);
Expand Down

0 comments on commit 7558cef

Please sign in to comment.