Cuberite
A lightweight, fast and extensible game server for Minecraft
Public Member Functions | Private Types | Private Attributes | Friends | List of all members
cTeam Class Reference

#include <Scoreboard.h>

Public Member Functions

bool AddPlayer (const AString &a_Name)
 Adds a new player to the team. More...
 
bool AllowsFriendlyFire (void) const
 
bool CanSeeFriendlyInvisible (void) const
 
 cTeam (const AString &a_Name, const AString &a_DisplayName, const AString &a_Prefix, const AString &a_Suffix)
 
const AStringGetDisplayName (void) const
 
const AStringGetName (void) const
 
size_t GetNumPlayers (void) const
 Returns the number of registered players. More...
 
const AStringGetPrefix (void) const
 
const AStringGetSuffix (void) const
 
bool HasPlayer (const AString &a_Name) const
 Returns whether the specified player is in this team. More...
 
bool RemovePlayer (const AString &a_Name)
 Removes a player from the team. More...
 
void Reset (void)
 Removes all registered players. More...
 
void SetCanSeeFriendlyInvisible (bool a_Flag)
 
void SetDisplayName (const AString &a_Name)
 
void SetFriendlyFire (bool a_Flag)
 
void SetPrefix (const AString &a_Prefix)
 
void SetSuffix (const AString &a_Suffix)
 

Private Types

typedef std::set< AStringcPlayerNameSet
 

Private Attributes

bool m_AllowsFriendlyFire
 
bool m_CanSeeFriendlyInvisible
 
AString m_DisplayName
 
AString m_Name
 
cPlayerNameSet m_Players
 
AString m_Prefix
 
AString m_Suffix
 

Friends

class cScoreboardSerializer
 

Detailed Description

Definition at line 125 of file Scoreboard.h.

Member Typedef Documentation

◆ cPlayerNameSet

typedef std::set<AString> cTeam::cPlayerNameSet
private

Definition at line 176 of file Scoreboard.h.

Constructor & Destructor Documentation

◆ cTeam()

cTeam::cTeam ( const AString a_Name,
const AString a_DisplayName,
const AString a_Prefix,
const AString a_Suffix 
)

Definition at line 196 of file Scoreboard.cpp.

Member Function Documentation

◆ AddPlayer()

bool cTeam::AddPlayer ( const AString a_Name)

Adds a new player to the team.

Definition at line 213 of file Scoreboard.cpp.

◆ AllowsFriendlyFire()

bool cTeam::AllowsFriendlyFire ( void  ) const
inline

Definition at line 155 of file Scoreboard.h.

◆ CanSeeFriendlyInvisible()

bool cTeam::CanSeeFriendlyInvisible ( void  ) const
inline

Definition at line 156 of file Scoreboard.h.

◆ GetDisplayName()

const AString& cTeam::GetDisplayName ( void  ) const
inline

Definition at line 158 of file Scoreboard.h.

◆ GetName()

const AString& cTeam::GetName ( void  ) const
inline

Definition at line 159 of file Scoreboard.h.

◆ GetNumPlayers()

size_t cTeam::GetNumPlayers ( void  ) const

Returns the number of registered players.

Definition at line 264 of file Scoreboard.cpp.

◆ GetPrefix()

const AString& cTeam::GetPrefix ( void  ) const
inline

Definition at line 161 of file Scoreboard.h.

◆ GetSuffix()

const AString& cTeam::GetSuffix ( void  ) const
inline

Definition at line 162 of file Scoreboard.h.

◆ HasPlayer()

bool cTeam::HasPlayer ( const AString a_Name) const

Returns whether the specified player is in this team.

Definition at line 231 of file Scoreboard.cpp.

◆ RemovePlayer()

bool cTeam::RemovePlayer ( const AString a_Name)

Removes a player from the team.

Definition at line 222 of file Scoreboard.cpp.

◆ Reset()

void cTeam::Reset ( void  )

Removes all registered players.

Definition at line 242 of file Scoreboard.cpp.

◆ SetCanSeeFriendlyInvisible()

void cTeam::SetCanSeeFriendlyInvisible ( bool  a_Flag)
inline

Definition at line 165 of file Scoreboard.h.

◆ SetDisplayName()

void cTeam::SetDisplayName ( const AString a_Name)

Definition at line 253 of file Scoreboard.cpp.

◆ SetFriendlyFire()

void cTeam::SetFriendlyFire ( bool  a_Flag)
inline

Definition at line 164 of file Scoreboard.h.

◆ SetPrefix()

void cTeam::SetPrefix ( const AString a_Prefix)
inline

Definition at line 169 of file Scoreboard.h.

◆ SetSuffix()

void cTeam::SetSuffix ( const AString a_Suffix)
inline

Definition at line 170 of file Scoreboard.h.

Friends And Related Function Documentation

◆ cScoreboardSerializer

friend class cScoreboardSerializer
friend

Definition at line 189 of file Scoreboard.h.

Member Data Documentation

◆ m_AllowsFriendlyFire

bool cTeam::m_AllowsFriendlyFire
private

Definition at line 178 of file Scoreboard.h.

◆ m_CanSeeFriendlyInvisible

bool cTeam::m_CanSeeFriendlyInvisible
private

Definition at line 179 of file Scoreboard.h.

◆ m_DisplayName

AString cTeam::m_DisplayName
private

Definition at line 181 of file Scoreboard.h.

◆ m_Name

AString cTeam::m_Name
private

Definition at line 182 of file Scoreboard.h.

◆ m_Players

cPlayerNameSet cTeam::m_Players
private

Definition at line 187 of file Scoreboard.h.

◆ m_Prefix

AString cTeam::m_Prefix
private

Definition at line 184 of file Scoreboard.h.

◆ m_Suffix

AString cTeam::m_Suffix
private

Definition at line 185 of file Scoreboard.h.


The documentation for this class was generated from the following files: