Development Assistance [Bug?] how to fully remove xp bar

Discussion in 'Plugin Help/Development/Requests' started by TeddyDev, Feb 8, 2015.

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

    TeddyDev

    Hey guys,

    I was recently programming and made a mistake, the results gave me a pretty sweet bug and i thought id share it with you all :)

    NOTE: This does not generate errors to the console!

    NOTE: I also havnt tested this with 1.7.x! only 1.8

    All you need to do is,
    player.setLevel(-100);
    and that will remove the whole exp bar leaving it looking like this: http://gyazo.com/2ee424db63c89947f9282628bde1f31e
     
  2. @TeddyDev Wrong place in the forums.
    What would happen if a player was to get more xp?
     
  3. Offline

    ProMCKingz

    @TeddyDev @DJSkepter Not much of a bug, but i'm assuming as a player gains xp it will re appear. Also, this should be moved to resources section.
     
  4. Offline

    TeddyDev

    @ProMCKingz
    This isnt in the wrong forum because its about bukkit development.

    @DJSkepter
    Players would eventially get there xp bar back when -100 levels have been collected.
    if you wanted to remove the bar for a very long time, use -999999 instead
     
  5. Offline

    timtower Administrator Administrator Moderator

    @TeddyDev It actually is, 1.8 was never released by Bukkit.
    Moved to Bukkit alternatives.
     
Thread Status:
Not open for further replies.

Share This Page