mirror of
https://github.com/PaperMC/Paper.git
synced 2025-05-19 05:30:23 -07:00
Player - Expose player score (#12243)
This commit is contained in:
parent
4519857817
commit
8e69d981fa
@ -3902,4 +3902,20 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
|||||||
* @return the result of this method, holding leftovers and spawned items.
|
* @return the result of this method, holding leftovers and spawned items.
|
||||||
*/
|
*/
|
||||||
PlayerGiveResult give(Collection<ItemStack> items, boolean dropIfFull);
|
PlayerGiveResult give(Collection<ItemStack> items, boolean dropIfFull);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the score that shows in the death screen of the player.
|
||||||
|
* <p>This amount is added to when the player gains experience.</p>
|
||||||
|
*
|
||||||
|
* @return Death screen score of player
|
||||||
|
*/
|
||||||
|
int getDeathScreenScore();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the score that shows in the death screen of the player.
|
||||||
|
* <p>This amount is added to when the player gains experience.</p>
|
||||||
|
*
|
||||||
|
* @param score New death screen score of player
|
||||||
|
*/
|
||||||
|
void setDeathScreenScore(int score);
|
||||||
}
|
}
|
||||||
|
@ -3599,4 +3599,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
|||||||
|
|
||||||
return forwardMovement == backwardMovement ? 0 : forwardMovement ? 1 : -1;
|
return forwardMovement == backwardMovement ? 0 : forwardMovement ? 1 : -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getDeathScreenScore() {
|
||||||
|
return getHandle().getScore();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setDeathScreenScore(final int score) {
|
||||||
|
getHandle().setScore(score);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user