diff options
author | Mattes D <github@xoft.cz> | 2014-09-29 20:39:13 +0200 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2014-09-29 20:39:13 +0200 |
commit | d3c2c02b6b35c96b830a1e55691be9d10a4b0784 (patch) | |
tree | b9d3abf6a0a4d65c6779b25ecec0ba89d0f21af6 /src/RankManager.h | |
parent | Merge pull request #1480 from w00tc0d3/work (diff) | |
parent | Fixed a typo in the description. (diff) | |
download | cuberite-d3c2c02b6b35c96b830a1e55691be9d10a4b0784.tar cuberite-d3c2c02b6b35c96b830a1e55691be9d10a4b0784.tar.gz cuberite-d3c2c02b6b35c96b830a1e55691be9d10a4b0784.tar.bz2 cuberite-d3c2c02b6b35c96b830a1e55691be9d10a4b0784.tar.lz cuberite-d3c2c02b6b35c96b830a1e55691be9d10a4b0784.tar.xz cuberite-d3c2c02b6b35c96b830a1e55691be9d10a4b0784.tar.zst cuberite-d3c2c02b6b35c96b830a1e55691be9d10a4b0784.zip |
Diffstat (limited to 'src/RankManager.h')
-rw-r--r-- | src/RankManager.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/RankManager.h b/src/RankManager.h index f364bba6a..3f5884f2e 100644 --- a/src/RankManager.h +++ b/src/RankManager.h @@ -60,6 +60,10 @@ public: If the player has no rank assigned, returns an empty string (NOT the default rank). */ AString GetPlayerRankName(const AString & a_PlayerUUID); + /** Returns the last name that the specified player has. + An empty string is returned if the player isn't in the database. */ + AString GetPlayerName(const AString & a_PlayerUUID); + /** Returns the names of Groups that the specified player has assigned to them. */ AStringVector GetPlayerGroups(const AString & a_PlayerUUID); @@ -79,6 +83,9 @@ public: Returns an empty vector if the rank doesn't exist. Any non-existent groups are ignored. */ AStringVector GetRankPermissions(const AString & a_RankName); + /** Returns the short uuids of all defined players. */ + AStringVector GetAllPlayerUUIDs(void); + /** Returns the names of all defined ranks. */ AStringVector GetAllRanks(void); @@ -211,6 +218,13 @@ public: /** Returns the name of the default rank. */ const AString & GetDefaultRank(void) const { return m_DefaultRank; } + /** Removes all player ranks from the database. Note that this doesn't change the cPlayer instances + for the already connected players, you need to update all the instances manually. */ + void ClearPlayerRanks(void); + + /** Updates the playername that is saved with this uuid. Returns false if a error occurred */ + bool UpdatePlayerName(const AString & a_PlayerUUID, const AString & a_NewPlayerName); + protected: /** The database storage for all the data. Protected by m_CS. */ |