public static enum PlayerGameModeChangeEvent.Cause extends Enum<PlayerGameModeChangeEvent.Cause>
| Enum Constant and Description |
|---|
COMMAND
The
/gamemode command was used. |
DEFAULT_GAMEMODE
A player had their gamemode changed as a result of
the
/defaultgamemode command, or they joined
with a gamemode that was not the default gamemode and
force-gamemode in server.properties is set to true. |
HARDCORE_DEATH
When the player dies in a hardcore world and has their gamemode
changed to
GameMode.SPECTATOR. |
PLUGIN
A plugin changed the player's gamemode with
HumanEntity.setGameMode(GameMode). |
UNKNOWN
This cause is only used if a plugin fired their own
PlayerGameModeChangeEvent and did not include a
cause. |
| Modifier and Type | Method and Description |
|---|---|
static PlayerGameModeChangeEvent.Cause |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static PlayerGameModeChangeEvent.Cause[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final PlayerGameModeChangeEvent.Cause PLUGIN
HumanEntity.setGameMode(GameMode).public static final PlayerGameModeChangeEvent.Cause COMMAND
/gamemode command was used.public static final PlayerGameModeChangeEvent.Cause DEFAULT_GAMEMODE
/defaultgamemode command, or they joined
with a gamemode that was not the default gamemode and
force-gamemode in server.properties is set to true.public static final PlayerGameModeChangeEvent.Cause HARDCORE_DEATH
GameMode.SPECTATOR.public static final PlayerGameModeChangeEvent.Cause UNKNOWN
PlayerGameModeChangeEvent and did not include a
cause. Can usually be ignored.public static PlayerGameModeChangeEvent.Cause[] values()
for (PlayerGameModeChangeEvent.Cause c : PlayerGameModeChangeEvent.Cause.values()) System.out.println(c);
public static PlayerGameModeChangeEvent.Cause valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullCopyright © 2021. All rights reserved.