If you need to reference this type directly, like when casting an Array, or as a parameter, you will need to import it. Simply add the import at
the top of the file.
import crafttweaker . api.world . GameType;
GameType
implements the following interfaces:
StringRepresentable
Undocumented Interfaces Comparable <Enum >
GameType is an enum with 4 constants. They are accessible like so:
< constant : minecraft:world/gametype:adventure >
< constant : minecraft:world/gametype:creative >
< constant : minecraft:world/gametype:spectator >
< constant : minecraft:world/gametype:survival >
< constant : minecraft:world/gametype:adventure > .id
Return Type:
int
< constant : minecraft:world/gametype:adventure > .id();
Return Type:
int
// GameType.isBlockPlacingRestricted as bool
< constant : minecraft:world/gametype:adventure > .isBlockPlacingRestricted
Return Type:
bool
// GameType.isBlockPlacingRestricted() as bool;
< constant : minecraft:world/gametype:adventure > .isBlockPlacingRestricted();
Return Type:
bool
// GameType.isCreative as bool
< constant : minecraft:world/gametype:adventure > .isCreative
Return Type:
bool
// GameType.isCreative() as bool;
< constant : minecraft:world/gametype:adventure > .isCreative();
Return Type:
bool
// GameType.isSurvival as bool
< constant : minecraft:world/gametype:adventure > .isSurvival
Return Type:
bool
// GameType.isSurvival() as bool;
< constant : minecraft:world/gametype:adventure > .isSurvival();
Return Type:
bool
// GameType.longDisplayName as Component
< constant : minecraft:world/gametype:adventure > .longDisplayName
Return Type:
Component
// GameType.longDisplayName() as Component;
< constant : minecraft:world/gametype:adventure > .longDisplayName();
Return Type:
Component
// GameType.name as string
< constant : minecraft:world/gametype:adventure > .name
Return Type:
string
// GameType.name() as string;
< constant : minecraft:world/gametype:adventure > .name();
Return Type:
string
Gets the serialized name. // GameType.serializedName as string
< constant : minecraft:world/gametype:adventure > .serializedName
Return Type:
string
Gets the serialized name. Returns : the serialized name.
// GameType.serializedName() as string;
< constant : minecraft:world/gametype:adventure > .serializedName();
Return Type:
string
// GameType.shortDisplayName as Component
< constant : minecraft:world/gametype:adventure > .shortDisplayName
Return Type:
Component
// GameType.shortDisplayName() as Component;
< constant : minecraft:world/gametype:adventure > .shortDisplayName();
Return Type:
Component
// GameType.updatePlayerAbilities(abilities as Abilities);
< constant : minecraft:world/gametype:adventure > .updatePlayerAbilities(myAbilities);