If Statement for Certain Level Ups?

Discussion in 'Plugin Development' 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

    masteroftime

    you can get the level of a player via the getLevel() method

    Code:java
    1. Player p = getServer().getPlayer("Playername");
    2. if(p.getLevel() > 30) {
    3. //your player's level is higher than 30
    4. }
     
Thread Status:
Not open for further replies.

Share This Page