From cb640ffea4a51a10db2e379ada8dc0487378ba09 Mon Sep 17 00:00:00 2001 From: bibo38 Date: Wed, 12 Oct 2016 14:38:45 +0200 Subject: Spectators added (#2852) --- src/World.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/World.h') diff --git a/src/World.h b/src/World.h index de34af1d2..0bcd1f823 100644 --- a/src/World.h +++ b/src/World.h @@ -78,6 +78,8 @@ typedef cItemCallback cCommandBlockCallback; typedef cItemCallback cMobHeadCallback; typedef cItemCallback cFlowerPotCallback; +typedef std::function cLambdaPlayerCallback; +typedef std::function cLambdaEntityCallback; @@ -288,6 +290,7 @@ public: /** Finds the player over his uuid and calls the callback */ bool DoWithPlayerByUUID(const AString & a_PlayerUUID, cPlayerListCallback & a_Callback); // >> EXPORTED IN MANUALBINDINGS << + bool DoWithPlayerByUUID(const AString & a_PlayerUUID, cLambdaPlayerCallback a_Callback); // Lambda version void SendPlayerList(cPlayer * a_DestPlayer); // Sends playerlist to the player @@ -313,6 +316,7 @@ public: /** Calls the callback if the entity with the specified ID is found, with the entity object as the callback param. Returns true if entity found and callback returned false. */ bool DoWithEntityByID(UInt32 a_UniqueID, cEntityCallback & a_Callback); // Exported in ManualBindings.cpp + bool DoWithEntityByID(UInt32 a_UniqueID, cLambdaEntityCallback a_Callback); // Lambda version /** Compares clients of two chunks, calls the callback accordingly */ void CompareChunkClients(int a_ChunkX1, int a_ChunkZ1, int a_ChunkX2, int a_ChunkZ2, cClientDiffCallback & a_Callback); -- cgit v1.2.3