mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-24 01:06:01 +01: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:
parent
ae4cd083ac
commit
b3819b1bbb
1 changed files with 36 additions and 4 deletions
|
@ -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 int getExperience();
|
||||
public float getExp();
|
||||
|
||||
/**
|
||||
* 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
|
||||
*/
|
||||
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);
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Reference in a new issue