Class HandCompat
java.lang.Object
io.github.addoncommunity.galactifun.util.HandCompat
Reflective helpers for the 1.9+ off-hand API (getHand/getItemInOffHand/EquipmentSlot), so handlers run on 1.8.
-
Method Summary
Modifier and TypeMethodDescriptionstatic booleanisMainHand(Object event) True if the interaction used the main hand.static org.bukkit.inventory.ItemStackoffHandItem(org.bukkit.inventory.PlayerInventory inv) The off-hand item, or AIR on versions that have no off-hand.
-
Method Details
-
isMainHand
True if the interaction used the main hand. Always true before 1.9 (no off-hand exists). -
offHandItem
public static org.bukkit.inventory.ItemStack offHandItem(org.bukkit.inventory.PlayerInventory inv) The off-hand item, or AIR on versions that have no off-hand.
-