Potion effects on player when custom item in inventory or hotbar

Discussion in 'Spigot Plugin Help' started by Iskyland, Feb 19, 2020.

  1. Hello!

    Basically like the title says, a long time ago there was a plugin on a certain server that gave players custom items. These had effects like Night Vision, Speed or even Extra Hearts. Sadly, I can't find the server anymore, and I believe it's been taken down.
    Currently, I have a plugin that can make custom items that works when that item is:
    - Being worn (armor, elytra)
    - Held in the main hand
    - Held in the left hand

    This already gives a lot of extra possibilities, but I wanted to look if there was a plugin or way to get even more of these effects, by filling an entire hotbar with these custom items.
    I think it can either be chaos and unbalanced, or it can make for some really cool kits that players can use in PvP or against custom Boss Mobs.

    I'm playing on 1.15.2.

    Thanks in advance!
     
  2. You can do that by looping to player inventory and checks if player inventory contains the custom item.