diff --git a/src/API/PluginAPI.php b/src/API/PluginAPI.php index 6cc65250..91b1b514 100644 --- a/src/API/PluginAPI.php +++ b/src/API/PluginAPI.php @@ -28,14 +28,13 @@ class PluginAPI extends stdClass{ foreach($this->getList() as $plugin){ $output .= $plugin["name"] . " v" . $plugin["version"] . ", "; } - $output = $output === "Plugins (0): " ? "No plugins installed.\n" : substr($output, 0, -2) . "\n"; + $output = $output === "Plugins (0): " ? "No plugins installed." : substr($output, 0, -2); break; case "version": - $output = "This server is running NostalgiaCore version " . MAJOR_VERSION . "\nCODENAME: 「 " . CODENAME . " 」\n(Implementing API version #" . CURRENT_API_VERSION . " for Minecraft: PE " . CURRENT_MINECRAFT_VERSION . ")"; + $output = "This server is running NostalgiaCore version: " . MAJOR_VERSION .", PHP version: ". PHP_VERSION . "\n(Implementing API version #" . CURRENT_API_VERSION . " for Minecraft: PE " . CURRENT_MINECRAFT_VERSION . ")"; if(GIT_COMMIT !== str_repeat("00", 20)){ $output .= " (git " . GIT_COMMIT . ")"; } - $output .= "\n"; break; } return $output; diff --git a/src/Player.php b/src/Player.php index 21e9036c..2b4680f0 100755 --- a/src/Player.php +++ b/src/Player.php @@ -1482,7 +1482,6 @@ class Player{ //$this->server->schedule(20, array($this, "teleport"), $pos); //$this->teleport($pos, isset($pData["yaw"]) ? $pData["yaw"] : false, isset($pData["pitch"]) ? $pData["pitch"] : false, true, true); $this->entity->setHealth($this->data->get("health"), "spawn", true); - $this->server->api->chat->broadcast($this->username." joined the game"); $this->server->api->entity->spawnAll($this); $this->server->api->entity->spawnToAll($this->entity); @@ -1506,6 +1505,7 @@ class Player{ $this->blocked = false; $this->spawned = true; $this->server->handle("player.spawn", $this); + $this->server->api->chat->broadcast($this->username." joined the game"); $this->server->api->player->spawnAllPlayers($this); $this->server->api->player->spawnToAllPlayers($this); break; @@ -1727,14 +1727,14 @@ class Player{ "yaw" => $this->entity->yaw, "pitch" => $this->entity->pitch ]; - $e = $this->server->api->entity->add($this->level, ENTITY_OBJECT, OBJECT_SNOWBALL, $d); + $e = $this->server->api->entity->add($this->level, ENTITY_OBJECT, OBJECT_ARROW, $d); $e->speedX = -sin(($e->yaw / 180) * M_PI) * cos(($e->pitch / 180) * M_PI); $e->speedZ = cos(($e->yaw / 180) * M_PI) * cos(($e->pitch / 180) * M_PI); $e->speedY = -sin(($e->pitch / 180) * M_PI); $e->shoot($e->speedX, $e->speedY, $e->speedZ, 1.5, 1.0); //$this->server->api->entity->spawnToAll($e); $e->spawn($this); - $this->getSlot($this->slot)->useOn("shooting", true); + //$this->getSlot($this->slot)->useOn("shooting", true); $this->removeItem(ARROW, 0, 1); } }