Items affecting a player

Discussion in 'Spigot Plugin Development' started by Trending_Gamer, Jun 22, 2016.

  1. How would I be able to check if a player was hit by a player head with a custom texture from Fresh Coal and the apply an effect to that player that got hit.

    On the side note how would I apply an effect to an item that was thrown by a player when it hits the ground?

    Thanks in advanced.
     
  2. 1. If you mean by "hit by a player head" as in, in an item form, use the PlayerPickupItemEvent

    2. With a scheduler task
     
  3. Sorry for not explaining it well I mean like when an arrow hits a player and then it deals damage but I want to for say add regen and if the texture equals a specific ID.
    (textures: eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvMjE1OTk4ODQ0M2VlNzVkMjBjNDljODlhYmFkNTU0NWJiNGZiNDUzYTQyYjAzODhiNTQ2NjM1NTY5OGJmYSJ9fX0)