summaryrefslogtreecommitdiffstats
path: root/source/World.h
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2013-07-29 09:57:34 +0200
committermadmaxoft <github@xoft.cz>2013-07-29 09:57:34 +0200
commit5530178aad3fa1a3061962d47d77b627ab5ceae3 (patch)
tree61ee7896061b4ef92877c120d9f5e917a6c5c924 /source/World.h
parentMerge pull request #15 from mc-server/webadmin (diff)
parentUpdated the automatic Lua bindings (diff)
downloadcuberite-5530178aad3fa1a3061962d47d77b627ab5ceae3.tar
cuberite-5530178aad3fa1a3061962d47d77b627ab5ceae3.tar.gz
cuberite-5530178aad3fa1a3061962d47d77b627ab5ceae3.tar.bz2
cuberite-5530178aad3fa1a3061962d47d77b627ab5ceae3.tar.lz
cuberite-5530178aad3fa1a3061962d47d77b627ab5ceae3.tar.xz
cuberite-5530178aad3fa1a3061962d47d77b627ab5ceae3.tar.zst
cuberite-5530178aad3fa1a3061962d47d77b627ab5ceae3.zip
Diffstat (limited to '')
-rw-r--r--source/World.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/source/World.h b/source/World.h
index 5da7218e2..e67b06789 100644
--- a/source/World.h
+++ b/source/World.h
@@ -106,7 +106,18 @@ public:
SetTimeOfDay(a_TimeOfDay);
}
+ /// Returns the current game mode. Partly OBSOLETE, you should use IsGameModeXXX() functions wherever applicable
eGameMode GetGameMode(void) const { return m_GameMode; }
+
+ /// Returns true if the world is in Creative mode
+ bool IsGameModeCreative(void) const { return (m_GameMode == gmCreative); }
+
+ /// Returns true if the world is in Survival mode
+ bool IsGameModeSurvival(void) const { return (m_GameMode == gmSurvival); }
+
+ /// Returns true if the world is in Adventure mode
+ bool IsGameModeAdventure(void) const { return (m_GameMode == gmAdventure); }
+
bool IsPVPEnabled(void) const { return m_bEnabledPVP; }
bool IsDeepSnowEnabled(void) const { return m_IsDeepSnowEnabled; }