remove useless parameters

This commit is contained in:
Sunch 2025-01-11 21:48:33 +08:00
parent 1fd52e82a5
commit 6fb46ccfae
5 changed files with 5 additions and 5 deletions

View file

@ -161,7 +161,7 @@ class BanAPI{
$player = $this->server->api->player->get($user); $player = $this->server->api->player->get($user);
if(!($player instanceof Player)){ if(!($player instanceof Player)){
$this->ops->set($user); $this->ops->set($user);
$this->ops->save($user); $this->ops->save();
$output .= $user . " is now op\n"; $output .= $user . " is now op\n";
break; break;
} }

View file

@ -150,7 +150,7 @@ class EntityAPI{
"y" => $pos->y, "y" => $pos->y,
"z" => $pos->z "z" => $pos->z
] + $data); ] + $data);
$this->spawnToAll($entity, $pos->level); $this->spawnToAll($entity);
} }
public function getNextEID(){ public function getNextEID(){

View file

@ -12,7 +12,7 @@ class PlayerAPI{
$this->server->addHandler("player.death", [$this, "handle"], 1); $this->server->addHandler("player.death", [$this, "handle"], 1);
$this->registerCmd("list"); $this->registerCmd("list");
$this->registerCmd("kill", "<player>"); $this->registerCmd("kill", "<player>");
$this->registerCmd("gamemode", "<mode> [player]", [$this, "commandHandler"]); $this->registerCmd("gamemode", "<mode> [player]");
$this->registerCmd("tp", "[target player] <destination player|w:world> OR /tp [target player] <x> <y> <z>"); $this->registerCmd("tp", "[target player] <destination player|w:world> OR /tp [target player] <x> <y> <z>");
$this->registerCmd("spawnpoint", "[player] [x] [y] [z]"); $this->registerCmd("spawnpoint", "[player] [x] [y] [z]");
$this->registerCmd("spawn"); $this->registerCmd("spawn");

View file

@ -99,7 +99,7 @@ abstract class Living extends Entity implements Pathfindable{
foreach($this->level->entityListPositioned[$ind] ?? [] as $entid){ foreach($this->level->entityListPositioned[$ind] ?? [] as $entid){
if(($this->level->entityList[$entid] ?? null) instanceof Entity){ if(($this->level->entityList[$entid] ?? null) instanceof Entity){
if($this->level->entityList[$entid]->isPushable() && $bb->intersectsWith($this->level->entityList[$entid]->boundingBox)){ 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);
} }
} }
} }

View file

@ -397,7 +397,7 @@ class Minecart extends Vehicle{
if($e instanceof Entity && $e->eid != $this->eid && $e->eid != $this->linkedEntity){ if($e instanceof Entity && $e->eid != $this->eid && $e->eid != $this->linkedEntity){
if($e->isPushable() && $e->boundingBox->intersectsWith($bb)){ if($e->isPushable() && $e->boundingBox->intersectsWith($bb)){
if($e->isPlayer()){ if($e->isPlayer()){
$this->applyCollision($e, true); $this->applyCollision($e);
}else{ }else{
$e->applyCollision($this); $e->applyCollision($this);
} }