Skip to content

Commit 6807141

Browse files
author
Coded
committed
🐛 Fix event not respecting bow's infinity level
1 parent 117d47c commit 6807141

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/com/hrznstudio/infinityfix/InfinityFix.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public class InfinityFix implements Addon {
1313
@Override
1414
public void init(SandboxAPI api) {
1515
api.on(ItemEvent.GetArrowType.class,
16-
ev -> ev.getArrow().isEmpty(),
16+
ev -> ev.getArrow().isEmpty() && ev.getWeapon().getLevel(Enchantments.INFINITY) > 0,
1717
ev -> ev.setArrow(ItemStack.of(Items.ARROW))
1818
);
1919
api.on(EnchantmentEvent.Compatible.class,

0 commit comments

Comments
 (0)