From 6fb46ccfae863a6eb8c6241da1fccc6e3f39f2bf Mon Sep 17 00:00:00 2001 From: Sunch <120295462+Sunch233@users.noreply.github.com> Date: Sat, 11 Jan 2025 21:48:33 +0800 Subject: [PATCH] remove useless parameters --- src/API/BanAPI.php | 2 +- src/API/EntityAPI.php | 2 +- src/API/PlayerAPI.php | 2 +- src/entity/Living.php | 2 +- src/entity/object/Minecart.php | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/API/BanAPI.php b/src/API/BanAPI.php index efc80b49..81082cee 100644 --- a/src/API/BanAPI.php +++ b/src/API/BanAPI.php @@ -161,7 +161,7 @@ class BanAPI{ $player = $this->server->api->player->get($user); if(!($player instanceof Player)){ $this->ops->set($user); - $this->ops->save($user); + $this->ops->save(); $output .= $user . " is now op\n"; break; } diff --git a/src/API/EntityAPI.php b/src/API/EntityAPI.php index 5167617f..6d64f453 100644 --- a/src/API/EntityAPI.php +++ b/src/API/EntityAPI.php @@ -150,7 +150,7 @@ class EntityAPI{ "y" => $pos->y, "z" => $pos->z ] + $data); - $this->spawnToAll($entity, $pos->level); + $this->spawnToAll($entity); } public function getNextEID(){ diff --git a/src/API/PlayerAPI.php b/src/API/PlayerAPI.php index 613c0736..0d7311ae 100644 --- a/src/API/PlayerAPI.php +++ b/src/API/PlayerAPI.php @@ -12,7 +12,7 @@ class PlayerAPI{ $this->server->addHandler("player.death", [$this, "handle"], 1); $this->registerCmd("list"); $this->registerCmd("kill", ""); - $this->registerCmd("gamemode", " [player]", [$this, "commandHandler"]); + $this->registerCmd("gamemode", " [player]"); $this->registerCmd("tp", "[target player] OR /tp [target player] "); $this->registerCmd("spawnpoint", "[player] [x] [y] [z]"); $this->registerCmd("spawn"); diff --git a/src/entity/Living.php b/src/entity/Living.php index b2e94bdf..d00f9bfb 100644 --- a/src/entity/Living.php +++ b/src/entity/Living.php @@ -99,7 +99,7 @@ abstract class Living extends Entity implements Pathfindable{ foreach($this->level->entityListPositioned[$ind] ?? [] as $entid){ if(($this->level->entityList[$entid] ?? null) instanceof Entity){ if($this->level->entityList[$entid]->isPushable() && $bb->intersectsWith($this->level->entityList[$entid]->boundingBox)){ - $this->level->entityList[$entid]->applyCollision($this, true); + $this->level->entityList[$entid]->applyCollision($this); } } } diff --git a/src/entity/object/Minecart.php b/src/entity/object/Minecart.php index f76ddd96..f10ab47e 100644 --- a/src/entity/object/Minecart.php +++ b/src/entity/object/Minecart.php @@ -397,7 +397,7 @@ class Minecart extends Vehicle{ if($e instanceof Entity && $e->eid != $this->eid && $e->eid != $this->linkedEntity){ if($e->isPushable() && $e->boundingBox->intersectsWith($bb)){ if($e->isPlayer()){ - $this->applyCollision($e, true); + $this->applyCollision($e); }else{ $e->applyCollision($this); }