From bb3b740b881cea93b5be64480c2456cf7b82b2d1 Mon Sep 17 00:00:00 2001 From: Nathan Adams Date: Wed, 30 Nov 2011 22:30:47 +0000 Subject: Deprecated player methods: getExperience setExperience due to new float value. Added giveExp, setExp, getExp --- src/main/java/org/bukkit/entity/Player.java | 36 +++++++++++++++++++++++++++-- 1 file changed, 34 insertions(+), 2 deletions(-) (limited to 'src/main') diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java index 9f23a086..71a6e980 100644 --- a/src/main/java/org/bukkit/entity/Player.java +++ b/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 float getExp(); + /** + * 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 + * 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); /** -- cgit v1.2.3