mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-23 04:59:46 +00:00
php version in /about
This commit is contained in:
parent
9abba9a2a2
commit
d60258097d
2 changed files with 5 additions and 6 deletions
|
|
@ -28,14 +28,13 @@ class PluginAPI extends stdClass{
|
||||||
foreach($this->getList() as $plugin){
|
foreach($this->getList() as $plugin){
|
||||||
$output .= $plugin["name"] . " v" . $plugin["version"] . ", ";
|
$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;
|
break;
|
||||||
case "version":
|
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)){
|
if(GIT_COMMIT !== str_repeat("00", 20)){
|
||||||
$output .= " (git " . GIT_COMMIT . ")";
|
$output .= " (git " . GIT_COMMIT . ")";
|
||||||
}
|
}
|
||||||
$output .= "\n";
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return $output;
|
return $output;
|
||||||
|
|
|
||||||
|
|
@ -1482,7 +1482,6 @@ class Player{
|
||||||
//$this->server->schedule(20, array($this, "teleport"), $pos);
|
//$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->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->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->spawnAll($this);
|
||||||
$this->server->api->entity->spawnToAll($this->entity);
|
$this->server->api->entity->spawnToAll($this->entity);
|
||||||
|
|
@ -1506,6 +1505,7 @@ class Player{
|
||||||
$this->blocked = false;
|
$this->blocked = false;
|
||||||
$this->spawned = true;
|
$this->spawned = true;
|
||||||
$this->server->handle("player.spawn", $this);
|
$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->spawnAllPlayers($this);
|
||||||
$this->server->api->player->spawnToAllPlayers($this);
|
$this->server->api->player->spawnToAllPlayers($this);
|
||||||
break;
|
break;
|
||||||
|
|
@ -1727,14 +1727,14 @@ class Player{
|
||||||
"yaw" => $this->entity->yaw,
|
"yaw" => $this->entity->yaw,
|
||||||
"pitch" => $this->entity->pitch
|
"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->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->speedZ = cos(($e->yaw / 180) * M_PI) * cos(($e->pitch / 180) * M_PI);
|
||||||
$e->speedY = -sin(($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);
|
$e->shoot($e->speedX, $e->speedY, $e->speedZ, 1.5, 1.0);
|
||||||
//$this->server->api->entity->spawnToAll($e);
|
//$this->server->api->entity->spawnToAll($e);
|
||||||
$e->spawn($this);
|
$e->spawn($this);
|
||||||
$this->getSlot($this->slot)->useOn("shooting", true);
|
//$this->getSlot($this->slot)->useOn("shooting", true);
|
||||||
$this->removeItem(ARROW, 0, 1);
|
$this->removeItem(ARROW, 0, 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue