Class HandCompat

java.lang.Object
io.github.addoncommunity.galactifun.util.HandCompat

public final class HandCompat extends Object
Reflective helpers for the 1.9+ off-hand API (getHand/getItemInOffHand/EquipmentSlot), so handlers run on 1.8.
  • Method Details

    • isMainHand

      public static boolean isMainHand(Object event)
      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.