summaryrefslogtreecommitdiffstats
path: root/src/Entities/Player.h
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2015-04-25 19:40:44 +0200
committerMattes D <github@xoft.cz>2015-04-25 21:05:43 +0200
commitb5998873e42eaec90267010557edd47f65af1463 (patch)
treeb2c31a9e263552f40e91bf2a5bc66a13778f7d20 /src/Entities/Player.h
parentAdded player restrictions to the DB and API. (diff)
downloadcuberite-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.h13
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;