Discussion in 'Plugin Development' started by Moon_werewolf, Jan 3, 2013.
I'm working on a plugin that going to give exp to players. But don't know the codes for it.
player.giveExp(int amount) or player.giveExpLevels(int amount)
Thanks that worked... but now I have the opposite problem. How do I remove exp? player.setExp(player.getExp() - 17); don't exactly work.
How does it not work? You may be thinking of player.getLevel()
It doesn't work for I want to remove 17 exp that I gave the player with the giveExp code. But setExp is a float to next level.
Moon_werewolf how about giving him -17 exp
Experience handling in Minecraft (and thus Bukkit) is rather unintuitive. See this thread for more discussion (and a class I wrote to make things easier): http://forums.bukkit.org/threads/ex...giving-taking-exp-a-bit-more-intuitive.54450/
Separate names with a comma.