Solved How do I check if a player has Looting?

Discussion in 'Plugin Development' started by MCnumi, Jul 7, 2016.

Thread Status:
Not open for further replies.
  1. Offline

    MCnumi

    Pretty much the title, but I'm asking this since there are 4 different enchants that begin with Looting.
     
  2. Offline

    Zombie_Striker

    @MCnumi
    If you're checking for looting for killing a mob, then use Loot_Bonus_Mob. If you want it for a block, then use Loot_Bonus_Block.
     
  3. Offline

    MCnumi

    Ah, but I can't find one for a player...
     
  4. Offline

    kampai

    entitydeathevent, check if death instance of player, check if item that player was killed with is equal to (item) then check if has enchantment looting, or check if item player was killed with has enchament looting
     
  5. Offline

    Zombie_Striker

    @MCnumi
    You would have to create a separate if statement checking if the killed entity was an instanceof a Player, along with a check for Loot_Bonus_Mob.
     
  6. Offline

    MCnumi

    Thats not my question... my question is if there is an enchantment Enum for Looting that involves hitting player, not just mobs or blocks.

    @Zombie_Striker Thanks for all your help, I already had instanceof Player. didn't know I could use looting_mobs for that though :p

    Thanks!
     
  7. Offline

    kampai

Thread Status:
Not open for further replies.

Share This Page