diff --git a/src/API/BanAPI.php b/src/API/BanAPI.php index bc32ced8a..5c59987a4 100644 --- a/src/API/BanAPI.php +++ b/src/API/BanAPI.php @@ -54,7 +54,6 @@ class BanAPI{ $this->server->api->console->alias("pardon", "ban remove"); $this->server->api->console->alias("pardon-ip", "banip remove"); $this->server->addHandler("console.command", array($this, "permissionsCheck"), 1); - $this->cmdWhitelist("help"); } public function cmdWhitelist($cmd){ diff --git a/src/API/ConsoleAPI.php b/src/API/ConsoleAPI.php index 6bb8ff06e..ec462217a 100644 --- a/src/API/ConsoleAPI.php +++ b/src/API/ConsoleAPI.php @@ -47,6 +47,7 @@ class ConsoleAPI{ $this->register("say", "Broadcast a message", array($this, "defaultCommands")); $this->register("save-all", "Save pending changes to disk", array($this, "defaultCommands")); $this->register("stop", "Stops the server gracefully", array($this, "defaultCommands")); + $this->server->api->ban->cmdWhitelist("help"); } function __destruct(){ diff --git a/src/Player.php b/src/Player.php index 1a4a25b52..96a2752d1 100644 --- a/src/Player.php +++ b/src/Player.php @@ -755,7 +755,7 @@ class Player{ if(($this->entity instanceof Entity) and $data["counter"] > $this->lastMovement){ $this->lastMovement = $data["counter"]; if($this->server->api->handle("player.move", $this->entity) === false){ - $this->teleport(new Vecotr3($this->entity->x, $this->entity->y, $this->entity->z), $this->entity->yaw, $this->entity->pitch); + $this->teleport(new Vector3($this->entity->x, $this->entity->y, $this->entity->z), $this->entity->yaw, $this->entity->pitch); }else{ $this->entity->setPosition($data["x"], $data["y"], $data["z"], $data["yaw"], $data["pitch"]); }