API
Functions and classes available in the Lua API
Public Types | Public Member Functions | List of all members
cPlayer Class Reference

#include <000e.h>

Inheritance diagram for cPlayer:
Inheritance graph
[legend]

Public Types

enum  { MAX_HEALTH = 20 }

Public Member Functions

void AddFoodExhaustion (float a_Exhaustion)
void AddToGroup (const AString &a_GroupName)
bool CanUseCommand (const AString &a_Command)
void CloseWindow (bool a_CanRefuse=true)
 Closes the current window, resets current window to m_InventoryWindow. A plugin may refuse the closing if a_CanRefuse is true.
void CloseWindowIfID (char a_WindowID, bool a_CanRefuse=true)
 Closes the current window if it matches the specified ID, resets current window to m_InventoryWindow.
bool Feed (short a_Food, float a_Saturation)
cClientHandleGetClientHandle (void) const
AString GetColor (void) const
const cItemGetEquippedItem (void) const
double GetEyeHeight ()
Vector3d GetEyePosition ()
short GetFoodLevel ()
float GetFoodSaturationLevel ()
eGameMode GetGameMode (void) const
cInventoryGetInventory (void)
std::string GetIP ()
int GetLastBlockActionCnt ()
float GetLastBlockActionTime ()
short GetMaxFoodLevel ()
float GetMaxFoodSaturationLevel ()
const AString & GetName (void) const
const double GetStance (void) const
cWindowGetWindow (void)
bool HasPermission (const AString &a_Permission)
void Heal (int a_Health)
 Heals the specified amount of HPs.
virtual void Initialize (cWorld *a_World)
bool IsInGroup (const AString &a_Group)
bool IsOnGround (void) const
bool IsVisible (void) const
void LoadPermissionsFromDisk (void)
virtual void MoveTo (const Vector3d &a_NewPos)
bool MoveToWorld (const char *a_WorldName)
void RemoveFromGroup (const AString &a_GroupName)
void Respawn (void)
void SendMessage (const AString &a_Message)
void SetGameMode (eGameMode a_GameMode)
void SetLastBlockActionCnt (int)
void SetLastBlockActionTime ()
void SetName (const AString &a_Name)
void SetVisible (bool a_bVisible)
void TossItem (bool a_bDraggingItem, char a_Amount=1, short a_CreateType=0, short a_CreateHealth=0)

Additional Inherited Members

- Static Public Member Functions inherited from cEntity
static const char * GetClassStatic (void)

Member Enumeration Documentation

anonymous enum
Enumerator:
MAX_HEALTH 

Member Function Documentation

void cPlayer::AddFoodExhaustion ( float  a_Exhaustion)
inline
void cPlayer::AddToGroup ( const AString &  a_GroupName)
bool cPlayer::CanUseCommand ( const AString &  a_Command)
void cPlayer::CloseWindow ( bool  a_CanRefuse = true)

Closes the current window, resets current window to m_InventoryWindow. A plugin may refuse the closing if a_CanRefuse is true.

void cPlayer::CloseWindowIfID ( char  a_WindowID,
bool  a_CanRefuse = true 
)

Closes the current window if it matches the specified ID, resets current window to m_InventoryWindow.

bool cPlayer::Feed ( short  a_Food,
float  a_Saturation 
)
cClientHandle* cPlayer::GetClientHandle ( void  ) const
inline
AString cPlayer::GetColor ( void  ) const
const cItem& cPlayer::GetEquippedItem ( void  ) const
inline
double cPlayer::GetEyeHeight ( )
Vector3d cPlayer::GetEyePosition ( )
short cPlayer::GetFoodLevel ( )
inline
float cPlayer::GetFoodSaturationLevel ( )
inline
eGameMode cPlayer::GetGameMode ( void  ) const
inline
cInventory& cPlayer::GetInventory ( void  )
inline
std::string cPlayer::GetIP ( )
inline
int cPlayer::GetLastBlockActionCnt ( )
inline
float cPlayer::GetLastBlockActionTime ( )
inline
short cPlayer::GetMaxFoodLevel ( )
inline
float cPlayer::GetMaxFoodSaturationLevel ( )
inline
const AString& cPlayer::GetName ( void  ) const
inline
const double cPlayer::GetStance ( void  ) const
inline
cWindow* cPlayer::GetWindow ( void  )
inline
bool cPlayer::HasPermission ( const AString &  a_Permission)
void cPlayer::Heal ( int  a_HitPoints)

Heals the specified amount of HPs.

Reimplemented from cPawn.

virtual void cPlayer::Initialize ( cWorld a_World)
virtual
bool cPlayer::IsInGroup ( const AString &  a_Group)
bool cPlayer::IsOnGround ( void  ) const
inline
bool cPlayer::IsVisible ( void  ) const
inline
void cPlayer::LoadPermissionsFromDisk ( void  )
virtual void cPlayer::MoveTo ( const Vector3d a_NewPos)
virtual
bool cPlayer::MoveToWorld ( const char *  a_WorldName)
void cPlayer::RemoveFromGroup ( const AString &  a_GroupName)
void cPlayer::Respawn ( void  )
void cPlayer::SendMessage ( const AString &  a_Message)
void cPlayer::SetGameMode ( eGameMode  a_GameMode)
void cPlayer::SetLastBlockActionCnt ( int  )
void cPlayer::SetLastBlockActionTime ( )
void cPlayer::SetName ( const AString &  a_Name)
inline
void cPlayer::SetVisible ( bool  a_bVisible)
void cPlayer::TossItem ( bool  a_bDraggingItem,
char  a_Amount = 1,
short  a_CreateType = 0,
short  a_CreateHealth = 0 
)