mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-14 11:45:52 -07:00
Deprecated player methods: getExperience setExperience due to new float value. Added giveExp, setExp, getExp
By: Nathan Adams <dinnerbone@dinnerbone.com>
This commit is contained in:
@@ -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);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user