Code: p.setLevel(p.getExpToLevel() - 10); This is what I'm using now, I've checked before hand if the p.getExpToLevel() >= 10, but when this is run, it adds some random amount of xp, eventually mounting to more than 14k levels after repeating for 4 or 5 times. How can I properly subtract xp levels from a player?