diff --git a/paper-api/src/main/java/org/bukkit/entity/Player.java b/paper-api/src/main/java/org/bukkit/entity/Player.java index 9f23a0866a..71a6e98088 100644 --- a/paper-api/src/main/java/org/bukkit/entity/Player.java +++ b/paper-api/src/main/java/org/bukkit/entity/Player.java @@ -337,18 +337,50 @@ public interface Player extends HumanEntity, CommandSender, OfflinePlayer { public void resetPlayerTime(); /** - * Gets the players current experience points towards the next level + * Gives the player the amount of experience specified. + * + * @param amount Exp amount to give + */ + public void giveExp(int amount); + + /** + * Gets the players current experience points towards the next level. + *

+ * This is a percentage value. 0 is "no progress" and 1 is "next level". * * @return Current experience points */ - - public int getExperience(); + public float getExp(); /** - * Sets the players current experience points + * Sets the players current experience points towards the next level + *

+ * This is a percentage value. 0 is "no progress" and 1 is "next level". * * @param exp New experience points */ + public void setExp(float exp); + + /** + * Gets the players current experience points towards the next level. + *

+ * This is a percentage value. 0 is "no progress" and 1 is "next level". + * + * @return Current experience points + * @deprecated use {@link #getExp()} - this method is unsafe to use! + */ + @Deprecated + public int getExperience(); + + /** + * Sets the players current experience points towards the next level + *

+ * This is a percentage value. 0 is "no progress" and 1 is "next level". + * + * @param exp New experience points + * @deprecated use {@link #setExp(float)} - this method is unsafe to use! + */ + @Deprecated public void setExperience(int exp); /**