diff options
author | Mattes D <github@xoft.cz> | 2015-04-25 19:40:44 +0200 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2015-04-25 21:05:43 +0200 |
commit | b5998873e42eaec90267010557edd47f65af1463 (patch) | |
tree | b2c31a9e263552f40e91bf2a5bc66a13778f7d20 /src/Entities/Player.h | |
parent | Added player restrictions to the DB and API. (diff) | |
download | cuberite-b5998873e42eaec90267010557edd47f65af1463.tar cuberite-b5998873e42eaec90267010557edd47f65af1463.tar.gz cuberite-b5998873e42eaec90267010557edd47f65af1463.tar.bz2 cuberite-b5998873e42eaec90267010557edd47f65af1463.tar.lz cuberite-b5998873e42eaec90267010557edd47f65af1463.tar.xz cuberite-b5998873e42eaec90267010557edd47f65af1463.tar.zst cuberite-b5998873e42eaec90267010557edd47f65af1463.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Entities/Player.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/Entities/Player.h b/src/Entities/Player.h index 3dae58dc1..8cce4e202 100644 --- a/src/Entities/Player.h +++ b/src/Entities/Player.h @@ -254,7 +254,10 @@ public: static bool PermissionMatches(const AStringVector & a_Permission, const AStringVector & a_Template); // Exported in ManualBindings with AString params /** Returns all the permissions that the player has assigned to them. */ - const AStringVector & GetPermissions(void) { return m_Permissions; } // Exported in ManualBindings.cpp + const AStringVector & GetPermissions(void) const { return m_Permissions; } // Exported in ManualBindings.cpp + + /** Returns all the restrictions that the player has assigned to them. */ + const AStringVector & GetRestrictions(void) const { return m_Restrictions; } // Exported in ManualBindings.cpp // tolua_begin @@ -500,10 +503,18 @@ protected: /** All the permissions that this player has, based on their rank. */ AStringVector m_Permissions; + /** All the restrictions that this player has, based on their rank. */ + AStringVector m_Restrictions; + /** All the permissions that this player has, based on their rank, split into individual dot-delimited parts. This is used mainly by the HasPermission() function to optimize the lookup. */ AStringVectorVector m_SplitPermissions; + /** All the restrictions that this player has, based on their rank, split into individual dot-delimited parts. + This is used mainly by the HasPermission() function to optimize the lookup. */ + AStringVectorVector m_SplitRestrictions; + + // Message visuals: AString m_MsgPrefix, m_MsgSuffix; AString m_MsgNameColorCode; |