summaryrefslogtreecommitdiffstats
path: root/src/Entities/Player.h
diff options
context:
space:
mode:
author12xx12 <44411062+12xx12@users.noreply.github.com>2020-10-15 20:18:32 +0200
committerGitHub <noreply@github.com>2020-10-15 20:18:32 +0200
commitc07ea7b9ab8acd9b7d8d4b18425f7927881d4ee5 (patch)
treead6a2243fe7eec7ddd29c18a4e0e8bc2227e3ce8 /src/Entities/Player.h
parentFix Android builds (#4998) (diff)
downloadcuberite-c07ea7b9ab8acd9b7d8d4b18425f7927881d4ee5.tar
cuberite-c07ea7b9ab8acd9b7d8d4b18425f7927881d4ee5.tar.gz
cuberite-c07ea7b9ab8acd9b7d8d4b18425f7927881d4ee5.tar.bz2
cuberite-c07ea7b9ab8acd9b7d8d4b18425f7927881d4ee5.tar.lz
cuberite-c07ea7b9ab8acd9b7d8d4b18425f7927881d4ee5.tar.xz
cuberite-c07ea7b9ab8acd9b7d8d4b18425f7927881d4ee5.tar.zst
cuberite-c07ea7b9ab8acd9b7d8d4b18425f7927881d4ee5.zip
Diffstat (limited to '')
-rw-r--r--src/Entities/Player.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/Entities/Player.h b/src/Entities/Player.h
index 791b583bd..a16a8d0d6 100644
--- a/src/Entities/Player.h
+++ b/src/Entities/Player.h
@@ -103,10 +103,10 @@ public:
inline int GetCurrentXp(void) { return m_CurrentXp; }
/** Gets the current level - XpLevel */
- int GetXpLevel(void);
+ int GetXpLevel(void) const;
/** Gets the experience bar percentage - XpP */
- float GetXpPercentage(void);
+ float GetXpPercentage(void) const;
/** Calculates the amount of XP needed for a given level
Ref: https://minecraft.gamepedia.com/XP
@@ -222,6 +222,9 @@ public:
/** Returns the associated team, nullptr if none */
cTeam * GetTeam(void) { return m_Team; } // tolua_export
+ /** Returns the associated team, nullptr if none */
+ const cTeam * GetTeam(void) const { return m_Team; }
+
/** Sets the player team, nullptr if none */
void SetTeam(cTeam * a_Team);