summaryrefslogtreecommitdiffstats
path: root/source/cPlayer.h
diff options
context:
space:
mode:
authorfaketruth <faketruth@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-03-16 17:16:37 +0100
committerfaketruth <faketruth@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-03-16 17:16:37 +0100
commitcbfca006f71ca4f61c948b644188d1c55867a587 (patch)
treed45d5dd2938ad858471583c235346719e81cddae /source/cPlayer.h
parentThat didn't work.. I forgot some cChunk functions were changed. Now it should compile again (diff)
downloadcuberite-cbfca006f71ca4f61c948b644188d1c55867a587.tar
cuberite-cbfca006f71ca4f61c948b644188d1c55867a587.tar.gz
cuberite-cbfca006f71ca4f61c948b644188d1c55867a587.tar.bz2
cuberite-cbfca006f71ca4f61c948b644188d1c55867a587.tar.lz
cuberite-cbfca006f71ca4f61c948b644188d1c55867a587.tar.xz
cuberite-cbfca006f71ca4f61c948b644188d1c55867a587.tar.zst
cuberite-cbfca006f71ca4f61c948b644188d1c55867a587.zip
Diffstat (limited to 'source/cPlayer.h')
-rw-r--r--source/cPlayer.h19
1 files changed, 13 insertions, 6 deletions
diff --git a/source/cPlayer.h b/source/cPlayer.h
index ef94b3fc7..830289046 100644
--- a/source/cPlayer.h
+++ b/source/cPlayer.h
@@ -64,15 +64,15 @@ public:
void SendMessage( const char* a_Message ); //tolua_export
- const AString & GetName(void) const; //tolua_export
- void SetName(const AString & a_Name); //tolua_export
+ const AString & GetName(void) const { return m_PlayerName; } //tolua_export
+ void SetName(const AString & a_Name) { m_PlayerName = a_Name; } //tolua_export
typedef std::list< cGroup* > GroupList;
typedef std::list< std::string > StringList;
void AddToGroup( const char* a_GroupName ); //tolua_export
bool CanUseCommand( const char* a_Command ); //tolua_export
bool HasPermission( const char* a_Permission ); //tolua_export
- const GroupList & GetGroups(); // >> EXPORTED IN MANUALBINDINGS <<
+ const GroupList & GetGroups() { return m_Groups; } // >> EXPORTED IN MANUALBINDINGS <<
StringList GetResolvedPermissions(); // >> EXPORTED IN MANUALBINDINGS <<
bool IsInGroup( const char* a_Group ); //tolua_export
@@ -95,7 +95,7 @@ public:
bool LoadFromDisk();
void LoadPermissionsFromDisk(); //tolua_export
- const AString & GetLoadedWorldName();
+ const AString & GetLoadedWorldName() { return m_LoadedWorldName; }
void UseEquippedItem();
@@ -103,8 +103,15 @@ public:
protected:
virtual void Destroyed();
- struct sPlayerState;
- sPlayerState* m_pState;
+ typedef std::map< std::string, bool > PermissionMap;
+ PermissionMap m_ResolvedPermissions;
+ PermissionMap m_Permissions;
+
+ GroupList m_ResolvedGroups;
+ GroupList m_Groups;
+
+ std::string m_PlayerName;
+ std::string m_LoadedWorldName;
bool m_bVisible;