|
Faucet Mod SDK 1.0.0
Modding API for Minecraft Legacy Console Edition
|
Manages a ServerPlayer's game mode state and block breaking. More...
#include <SDK.h>
Public Member Functions | |
| bool | isSurvival () |
| Check if the player is in Survival mode. | |
| bool | isCreative () |
| Check if the player is in Creative mode. | |
| void | setGameModeForPlayer (GameType *gameType) |
| Change the player's game mode. | |
| GameType * | getGameModeForPlayer () |
| Get the current GameType for this player. | |
| bool | destroyBlock (int x, int y, int z) |
| Force-destroy a block at a position (ignores survival rules). | |
| class GameRulesInstance * | getGameRules () |
| Get the game rules instance. | |
Public Attributes | |
| Level * | level |
| The level this game mode is operating in. | |
| shared_ptr< ServerPlayer > | player |
| The player this game mode belongs to. | |
Manages a ServerPlayer's game mode state and block breaking.
Access via ServerPlayer::gameMode.
| bool ServerPlayerGameMode::destroyBlock | ( | int | x, |
| int | y, | ||
| int | z ) |
Force-destroy a block at a position (ignores survival rules).
| x,y,z | Block coordinates. |
| GameType * ServerPlayerGameMode::getGameModeForPlayer | ( | ) |
Get the current GameType for this player.
| bool ServerPlayerGameMode::isCreative | ( | ) |
Check if the player is in Creative mode.
| bool ServerPlayerGameMode::isSurvival | ( | ) |
Check if the player is in Survival mode.
| void ServerPlayerGameMode::setGameModeForPlayer | ( | GameType * | gameType | ) |
Change the player's game mode.
| gameType | New GameType. |