If Statement for Certain Level Ups?

Discussion in 'Bukkit Help' started by NinjaWAffles, Jan 29, 2012.

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

    NinjaWAffles

    Hey, I am starting on a mod and I would like to know if there is a way to make an if statement that would check how high a players level is.

    So if a player is higher than Level 30 then a variable would be called. I'm sure this is possible, but I am just starting to make modifications for Bukkit and I would like to know if this is possible.

    Thank you for your help!
    ~Ninjawaffles
     
  2. Offline

    iPhysX

    Where are you checking? In a command, in a listener?

    If in OnCommand:
    Code:
    Player p = (Player) sender;
    Int pLvl = p.getLevel();
     
    if (pLvl > 30){
    //do something
    }
    if in Listener/Event:
    Code:
    Player p = event.getPlayer;
    Int pLvl = p.getLevel();
     
    if (pLvl > 30){
    //do something
    }
     
Thread Status:
Not open for further replies.

Share This Page