diff options
author | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2014-07-07 00:50:22 +0200 |
---|---|---|
committer | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2014-07-07 00:50:22 +0200 |
commit | 9e44b0aae164f2456a452714f869cc9670732d8e (patch) | |
tree | 952cf9c8aca9c1b200b8285586e48e50a0188667 /src/BlockEntities/ChestEntity.h | |
parent | Fixed OpenSSL programs and tests being generated when testing disabled. (diff) | |
download | cuberite-9e44b0aae164f2456a452714f869cc9670732d8e.tar cuberite-9e44b0aae164f2456a452714f869cc9670732d8e.tar.gz cuberite-9e44b0aae164f2456a452714f869cc9670732d8e.tar.bz2 cuberite-9e44b0aae164f2456a452714f869cc9670732d8e.tar.lz cuberite-9e44b0aae164f2456a452714f869cc9670732d8e.tar.xz cuberite-9e44b0aae164f2456a452714f869cc9670732d8e.tar.zst cuberite-9e44b0aae164f2456a452714f869cc9670732d8e.zip |
Diffstat (limited to 'src/BlockEntities/ChestEntity.h')
-rw-r--r-- | src/BlockEntities/ChestEntity.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/BlockEntities/ChestEntity.h b/src/BlockEntities/ChestEntity.h index ce16f84d7..42cf7657c 100644 --- a/src/BlockEntities/ChestEntity.h +++ b/src/BlockEntities/ChestEntity.h @@ -35,7 +35,7 @@ public: // tolua_end /// Constructor used for normal operation - cChestEntity(int a_BlockX, int a_BlockY, int a_BlockZ, cWorld * a_World); + cChestEntity(int a_BlockX, int a_BlockY, int a_BlockZ, cWorld * a_World, BLOCKTYPE a_Type); virtual ~cChestEntity(); @@ -50,6 +50,17 @@ public: /// Opens a new chest window for this chest. Scans for neighbors to open a double chest window, if appropriate. void OpenNewWindow(void); + + /** Gets the number of players who currently have this chest open */ + int GetNumberOfPlayers(void) const { return m_ActivePlayers; } + + /** Gets the number of players who currently have this chest open */ + void SetNumberOfPlayers(int a_Amount) { m_ActivePlayers = a_Amount; } + +private: + + /** Holds the number of players who currently have this chest open */ + int m_ActivePlayers; } ; // tolua_export |