Solved Very quick XP question...

Discussion in 'Plugin Development' started by meguy26, Apr 4, 2015.

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

    meguy26

    Just as a quick question, when i call "player.setLevel(x)" in my code, does it trigger a PlayerExpChangeEvent?
     
  2. Offline

    Zombie_Striker

    It should. You can test it by setting up the Event that prints a message and having a command that uses. setLevel().
     
  3. Offline

    An0nym8us

    Answer for your question: unfortunately no (if believes to Bukkit JavaDoc).
     
  4. Offline

    meguy26

    @An0nym8us
    No, no, thats good! I dont want it to be called when i change it in code.
    See, im doing a custom leveling system, so im cancelling XpChangeEvent, and if the code triggered that then my plugin would not work :).

    EDIT:
    I'm going to test it now.

    EDIT 2:

    Tested, it is as @An0nym8us says, callin player.setLevel(x) in code will not trigger PlayerExpChangeEvent
     
    Last edited: Apr 4, 2015
Thread Status:
Not open for further replies.

Share This Page