Deprecated player methods: getExperience setExperience due to new float value. Added giveExp, setExp, getExp

This commit is contained in:
Nathan Adams 2011-11-30 22:30:47 +00:00
parent 4595a70056
commit bb3b740b88

View File

@ -337,18 +337,50 @@ public interface Player extends HumanEntity, CommandSender, OfflinePlayer {
public void resetPlayerTime(); 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 * @return Current experience points
*/ */
public float getExp();
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 * @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 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); public void setExperience(int exp);
/** /**