summaryrefslogtreecommitdiffstats
path: root/src/RankManager.h
diff options
context:
space:
mode:
authorHowaner <franzi.moos@googlemail.com>2014-11-18 14:56:32 +0100
committerHowaner <franzi.moos@googlemail.com>2014-11-18 14:56:32 +0100
commit42120e2ea5db0cdb9920ff1c5efef33e0f496d48 (patch)
tree20ba1ae0a53f757cb8814b6cd6a466fe5acf1308 /src/RankManager.h
parentFixed compile errors. (diff)
parentMerge pull request #1598 from mc-server/SignEditor (diff)
downloadcuberite-42120e2ea5db0cdb9920ff1c5efef33e0f496d48.tar
cuberite-42120e2ea5db0cdb9920ff1c5efef33e0f496d48.tar.gz
cuberite-42120e2ea5db0cdb9920ff1c5efef33e0f496d48.tar.bz2
cuberite-42120e2ea5db0cdb9920ff1c5efef33e0f496d48.tar.lz
cuberite-42120e2ea5db0cdb9920ff1c5efef33e0f496d48.tar.xz
cuberite-42120e2ea5db0cdb9920ff1c5efef33e0f496d48.tar.zst
cuberite-42120e2ea5db0cdb9920ff1c5efef33e0f496d48.zip
Diffstat (limited to 'src/RankManager.h')
-rw-r--r--src/RankManager.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/RankManager.h b/src/RankManager.h
index f364bba6a..5dff634b5 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. The returned players are ordered by their name (NOT their UUIDs). */
+ 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. */
@@ -226,7 +240,7 @@ protected:
bool m_IsInitialized;
/** The MojangAPI instance that is used for translating playernames to UUIDs.
- Set in Initialize(), may be NULL. */
+ Set in Initialize(), may be nullptr. */
cMojangAPI * m_MojangAPI;