Skip to content

Commit 8fb1e39

Browse files
feat(): added stash, and fixed slight visual bug with bows
1 parent d0281eb commit 8fb1e39

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/event/actions/item/ActionUseShortBow.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import net.swofty.type.generic.event.HypixelEvent;
77
import net.swofty.type.generic.event.HypixelEventClass;
88
import net.swofty.type.skyblockgeneric.item.SkyBlockItem;
9+
import net.swofty.type.skyblockgeneric.item.components.ArrowComponent;
910
import net.swofty.type.skyblockgeneric.item.components.BowComponent;
1011
import net.swofty.type.skyblockgeneric.user.SkyBlockPlayer;
1112

@@ -25,7 +26,10 @@ public void run(PlayerBeginItemUseEvent event) {
2526
bow.onBowShoot(player, item, 1.0);
2627
event.setCancelled(true);
2728
} else {
28-
// If there's no arrow, then we just do nothing
29+
// If there is an arrow, lets make sure they have one
30+
if (player.getAllOfComponentInInventory(ArrowComponent.class).isEmpty()) {
31+
event.setCancelled(true);
32+
}
2933
}
3034
}
3135
}

0 commit comments

Comments
 (0)