Get active hand

Is the any way to check for if a hand is active in Sponge. In Forge it would look like player.isHandActive() or even better for my case player.getActiveItemStack().

Before someone suggests using events, I’d prefer not to as I feel it would be cumbersome to have to have some code in the listener, and other code in another method or even class.

You mean checking if a hand is the main hand? Getting the hand type and comparing it against mainhand should be enough.

No, examples of a hand being active is a bow being used, eating, and so on.

Sorry, nope. You would set this flag yourself using the various subclasses of UseItemEvent.

Could you open an issue on SpongeAPI for this?

something like:
player.getItemInHand(HandTypes.MAIN_HAND) ? Which returns an ItemStack? Which you can further check if it is a bow…

Yeah, but that just checks if there’s a bow in the player’s hand. It doesn’t mean that the player is using it.

I did it a few days ago.