summaryrefslogtreecommitdiffstats
path: root/src/main
diff options
context:
space:
mode:
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);
/**