Bukkit/CraftBukkit — pull request #561 by jhaegg (2011-11-29 15:43:49+00:00)
Title: Fix for player experience interface (BUKKIT-47)

Fixes issue described in https://bukkit.atlassian.net/browse/BUKKIT-47
This version does not require any changes to net.minecraft.server and should not break if experience required for levels changes. One limitation this fix introduces is that CraftPlayer.setExperience() can not cause the player to gain experience beyond that required for the next level. Total experience and level will still become desynchronized iff an experience orb with more than two levels worth of experience is picked up by the player.