LevelChangeEvent

Discussion in 'Plugin Development' started by boberteohaste, Nov 4, 2019.

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

    boberteohaste

    Hey, I'm trying to add a function to an already existing plugin where when a player levels up a message is sent to them but the code i wrote for it doesn't work and I don't exactly know why. There are no errors and every other aspect of the plugin work so I'm at a loss. Here's my code.
    Code:
    public void levelStuff(PlayerLevelChangeEvent e) {
            Player p = e.getPlayer();
            p.getLevel();
                if(p.getLevel() == 2) {
                    p.sendMessage("test?");
                }
     
  2. Offline

    Intravenous

Thread Status:
Not open for further replies.

Share This Page