Advertisement
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

PlayerEffectChangeEvent?

Comments in 'Plugin Development' started by Jazzwhistle, May 11, 2016.

  1. Jazzwhistle
    Offline

    Jazzwhistle Notable Member

    Joined:
    Dec 27, 2014
    Posts:
    364
    Minecraft User:
    Awzaw
    Hi, is there an event I can use to detect and cancel effect changes for players? Or would I just have to intercept all commands to prevent certain players getting effects while doing parkour, for example? Thanks
  2. JackboyPlay
    Offline

    JackboyPlay Active Member

    Joined:
    Apr 25, 2015
    Posts:
    507
    Minecraft User:
    JackboyPlay
    Maybe you can use a task
    Jazzwhistle likes this.
  3. HotFireyDeath
    Offline

    HotFireyDeath Notable Member Plugin Developer

    Joined:
    Mar 19, 2015
    Posts:
    328
    Plugins:
    1
    Minecraft User:
    HotFireyDeath
    Unfortunately, there is no event listener for player effect changes...
    ImagicalGamer likes this.
  4. JackboyPlay
    Offline

    JackboyPlay Active Member

    Joined:
    Apr 25, 2015
    Posts:
    507
    Minecraft User:
    JackboyPlay
    use in the Task $player->getEffect();
  5. JackboyPlay
    Offline

    JackboyPlay Active Member

    Joined:
    Apr 25, 2015
    Posts:
    507
    Minecraft User:
    JackboyPlay
    Maybe
    PHP:
    if($player->getEffect()->getId() == 1){
    $player->sendTip("Youre SPEEDY");
    }

Share This Page

Advertisement