From 3a15dacf516f7927aebc0f75463a23eac51002fe Mon Sep 17 00:00:00 2001 From: GameHerobrine Date: Mon, 27 May 2024 22:49:10 +0300 Subject: [PATCH] shoghicp moment --- src/API/PlayerAPI.php | 1 - src/material/block/misc/TNTBlock.php | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/API/PlayerAPI.php b/src/API/PlayerAPI.php index 86d7d6a1..3deefafc 100644 --- a/src/API/PlayerAPI.php +++ b/src/API/PlayerAPI.php @@ -294,7 +294,6 @@ class PlayerAPI{ } $player = $this->get($target); if(($player instanceof Player) and ($player->entity instanceof Entity)){ - $target = $player->username; $origin = $this->get($name); if($origin instanceof Player){ $name = $origin->username; diff --git a/src/material/block/misc/TNTBlock.php b/src/material/block/misc/TNTBlock.php index 8e3a6c29..84f26a6d 100644 --- a/src/material/block/misc/TNTBlock.php +++ b/src/material/block/misc/TNTBlock.php @@ -19,7 +19,7 @@ class TNTBlock extends SolidBlock{ "power" => 3, "fuse" => 20 * 4, //4 seconds ); - $this->level->setBlock($this, new AirBlock(), false, false, true); + $this->level->fastSetBlockUpdate($this->x, $this->y, $this->z, 0, 0, true); $e = ServerAPI::request()->api->entity->add($this->level, ENTITY_OBJECT, OBJECT_PRIMEDTNT, $data); ServerAPI::request()->api->entity->spawnToAll($e); return true;