1.15.2 Get ItemStack of arrow loaded by bow

Discussion in 'Spigot Plugin Development' started by He-light, Feb 11, 2020.

  1. Hi, is there a way to get the Itemstack of the arrow, loaded by a bow or crossbow?
     
  2. if I remember right the arrow picked is first checking the offhand then iterating through the player inventory contents to pick the first arrow.
     
  3. For a crossbow you can use get the crossbow, get the item meta, cast it to CrossbowMeta and then call CrossbowMeta#getChargedProjectiles to get the loaded projectiles.