summaryrefslogtreecommitdiffstats
path: root/src/main
diff options
context:
space:
mode:
authorNathan Adams <dinnerbone@dinnerbone.com>2011-11-30 22:30:47 +0000
committerNathan Adams <dinnerbone@dinnerbone.com>2011-11-30 22:30:47 +0000
commitbb3b740b881cea93b5be64480c2456cf7b82b2d1 (patch)
tree894283fee36a75a48bbe3e99c963e42af0dc6188 /src/main
parent4595a700568f290f848e46a436cf4347343be6da (diff)
downloadbukkit-bb3b740b881cea93b5be64480c2456cf7b82b2d1.tar
bukkit-bb3b740b881cea93b5be64480c2456cf7b82b2d1.tar.gz
bukkit-bb3b740b881cea93b5be64480c2456cf7b82b2d1.tar.lz
bukkit-bb3b740b881cea93b5be64480c2456cf7b82b2d1.tar.xz
bukkit-bb3b740b881cea93b5be64480c2456cf7b82b2d1.zip
Deprecated player methods: getExperience setExperience due to new float value. Added giveExp, setExp, getExp
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/org/bukkit/entity/Player.java36
1 files changed, 34 insertions, 2 deletions
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.
+ * <p>
+ * 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
+ * <p>
+ * 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.
+ * <p>
+ * 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
+ * <p>
+ * 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);
/**