Overriding Potion effects

Discussion in 'Plugin Development' started by Jamscott, Aug 8, 2016.

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

    Jamscott

    So let's start at the beginning I'm creating a plugin where players are given a constant SPEED I if a value is met and it's constantly adding it to the player and removing it if not met.

    Here's the catch when a player right-clicks an item it gives them SPEED 3 but the constant speed overrides the SPEED 3 within an instant is there any easy way without having to loop through the active effects and checking the amp is > 3 to allow some effects to override and some to not?
     
  2. Offline

    Lordloss

    You can store the playernames/UUIDs which get the constant effect in a List. If you give someone an effect, check if hes in the list bevore.
     
Thread Status:
Not open for further replies.

Share This Page