Add Keys#PREVIOUS_GAME_MODE
This commit is contained in:
1 parent
bdd66ef487
commit
56723d1f02
2 files changed
+14
No files matched your search
@@ -2181,6 +2181,11 @@ public final class Keys {
|
||||
*/
|
||||
public static final Key<Value<Integer>> POWER = Keys.key(ResourceKey.sponge("power"), Integer.class);
|
||||
|
||||
/**
|
||||
* The previous {@link GameMode} of a {@link Humanoid}.
|
||||
*/
|
||||
public static final Key<Value<GameMode>> PREVIOUS_GAME_MODE = Keys.key(ResourceKey.sponge("previous_game_mode"), GameMode.class);
|
||||
|
||||
/**
|
||||
* A {@link Beacon}'s primary effect.
|
||||
*/
|
||||
|
||||
@@ -344,6 +344,15 @@ public interface ServerPlayer extends Player, Subject {
|
||||
return this.requireValue(Keys.GAME_MODE).asMutable();
|
||||
}
|
||||
|
||||
/**
|
||||
* {@link Keys#PREVIOUS_GAME_MODE}
|
||||
*
|
||||
* @return The previous game mode of the player
|
||||
*/
|
||||
default Value.Mutable<GameMode> previousGameMode() {
|
||||
return this.requireValue(Keys.PREVIOUS_GAME_MODE).asMutable();
|
||||
}
|
||||
|
||||
/**
|
||||
* {@link Keys#STATISTICS}
|
||||
*
|
||||
|
||||
Reference in new issue
Block a user