From 487f9a2aa9b5497495cef1ac3b9c7a603e69f862 Mon Sep 17 00:00:00 2001 From: Mattes D Date: Tue, 21 Apr 2020 22:19:22 +0200 Subject: Vector3 in Handlers (#4680) Refactored all cBlockHandler and cItemHandler descendants to use Vector3. --- src/World.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/World.h') diff --git a/src/World.h b/src/World.h index 2d956bf49..51ec2b10e 100644 --- a/src/World.h +++ b/src/World.h @@ -696,6 +696,13 @@ public: virtual void SendBlockTo(int a_X, int a_Y, int a_Z, cPlayer & a_Player) override; + /** Sends the block at the specified coords to the player. + Used mainly when plugins disable block-placing or block-breaking, to restore the previous block. */ + void SendBlockTo(const Vector3i a_BlockPos, cPlayer & a_Player) + { + SendBlockTo(a_BlockPos.x, a_BlockPos.y, a_BlockPos.z, a_Player); + } + /** Set default spawn at the given coordinates. Returns false if the new spawn couldn't be stored in the INI file. */ bool SetSpawn(double a_X, double a_Y, double a_Z); -- cgit v1.2.3