summaryrefslogtreecommitdiffstats
path: root/src/Entities/Player.h
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2015-04-25 22:32:13 +0200
committerMattes D <github@xoft.cz>2015-04-25 22:32:13 +0200
commit0de768b56dd4fb8eb89c3ebe4051e2a0681ccd7b (patch)
tree3a675c7945da7c96f9e4629b2e795027a88e8bc8 /src/Entities/Player.h
parentMerge pull request #1896 from mc-server/FindAndDoWithPlayerRace (diff)
parentcPlayer now checks restrictions. (diff)
downloadcuberite-0de768b56dd4fb8eb89c3ebe4051e2a0681ccd7b.tar
cuberite-0de768b56dd4fb8eb89c3ebe4051e2a0681ccd7b.tar.gz
cuberite-0de768b56dd4fb8eb89c3ebe4051e2a0681ccd7b.tar.bz2
cuberite-0de768b56dd4fb8eb89c3ebe4051e2a0681ccd7b.tar.lz
cuberite-0de768b56dd4fb8eb89c3ebe4051e2a0681ccd7b.tar.xz
cuberite-0de768b56dd4fb8eb89c3ebe4051e2a0681ccd7b.tar.zst
cuberite-0de768b56dd4fb8eb89c3ebe4051e2a0681ccd7b.zip
Diffstat (limited to 'src/Entities/Player.h')
-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;