mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-24 17:21:37 +01:00
SPIGOT-6899: Add Player#getPreviousGameMode
By: Doc <nachito94@msn.com>
This commit is contained in:
parent
4c024e72f9
commit
474603beb3
@ -1001,6 +1001,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
|||||||
return GameMode.getByValue(getHandle().gameMode.getGameModeForPlayer().getId());
|
return GameMode.getByValue(getHandle().gameMode.getGameModeForPlayer().getId());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public GameMode getPreviousGameMode() {
|
||||||
|
EnumGamemode previousGameMode = getHandle().gameMode.getPreviousGameModeForPlayer();
|
||||||
|
|
||||||
|
return (previousGameMode == null) ? null : GameMode.getByValue(previousGameMode.getId());
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void giveExp(int exp) {
|
public void giveExp(int exp) {
|
||||||
getHandle().giveExperiencePoints(exp);
|
getHandle().giveExperiencePoints(exp);
|
||||||
|
Loading…
Reference in New Issue
Block a user