So, I'm making an XpFly plugin (deducts XP to fly, etc), and there's one issue that happens when people enchant books before typing XpFly to start flying. The user had 57 levels and enchanted books until he had level 6. Then, when starting /xpfly, he was put back to 57 levels. I attempted to fix this issue within my code, and think it may be an issue with Bukkit/Spigot itself.
Here is the portion of the code that is run upon typing "/xpfly":
Player XP Not Updating After Enchanting Book
Here is the portion of the code that is run upon typing "/xpfly":
Code (text):
public static void...