summaryrefslogtreecommitdiffstats
path: root/src/Entities/Player.h
diff options
context:
space:
mode:
authorSimon Pribylski <66266021+Persson-dev@users.noreply.github.com>2022-01-24 21:24:55 +0100
committerGitHub <noreply@github.com>2022-01-24 21:24:55 +0100
commitf4c04299961a96e153bf50e2e1fb92c8f9db77f5 (patch)
treedf60ba3390281971920c1a1a2baf3a2f91ab55e9 /src/Entities/Player.h
parentAdd aarch64 to easyinstall. Fixes #5386 (diff)
downloadcuberite-f4c04299961a96e153bf50e2e1fb92c8f9db77f5.tar
cuberite-f4c04299961a96e153bf50e2e1fb92c8f9db77f5.tar.gz
cuberite-f4c04299961a96e153bf50e2e1fb92c8f9db77f5.tar.bz2
cuberite-f4c04299961a96e153bf50e2e1fb92c8f9db77f5.tar.lz
cuberite-f4c04299961a96e153bf50e2e1fb92c8f9db77f5.tar.xz
cuberite-f4c04299961a96e153bf50e2e1fb92c8f9db77f5.tar.zst
cuberite-f4c04299961a96e153bf50e2e1fb92c8f9db77f5.zip
Diffstat (limited to 'src/Entities/Player.h')
-rw-r--r--src/Entities/Player.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/Entities/Player.h b/src/Entities/Player.h
index 87eaad2fe..e0a88814d 100644
--- a/src/Entities/Player.h
+++ b/src/Entities/Player.h
@@ -301,7 +301,7 @@ public:
// tolua_end
- bool HasPermission(const AString & a_Permission); // tolua_export
+ bool HasPermission(const AString & a_Permission) const; // tolua_export
/** Returns true iff a_Permission matches the a_Template.
A match is defined by either being exactly the same, or each sub-item matches until there's a wildcard in a_Template.
@@ -545,8 +545,7 @@ public:
/** Returns wheter the player can fly or not. */
virtual bool CanFly(void) const { return m_IsFlightCapable; }
- /** (Re)loads the rank and permissions from the cRankManager.
- Loads the m_Rank, m_Permissions, m_MsgPrefix, m_MsgSuffix and m_MsgNameColorCode members. */
+ /** (Re)loads the rank and permissions from the cRankManager and sends a permission level update to the client. */
void LoadRank(void);
/** Sends the block in the specified range around the specified coord to the client
@@ -626,7 +625,6 @@ private:
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;
@@ -787,6 +785,10 @@ private:
void TickFreezeCode();
+ /** (Re)loads the rank and permissions from the cRankManager.
+ Loads the m_Rank, m_Permissions, m_MsgPrefix, m_MsgSuffix and m_MsgNameColorCode members. */
+ void RefreshRank();
+
// cEntity overrides:
virtual void ApplyArmorDamage(int DamageBlocked) override;
virtual void BroadcastMovementUpdate(const cClientHandle * a_Exclude = nullptr) override;