diff --git a/src/API/ConsoleAPI.php b/src/API/ConsoleAPI.php index 71a5fe0b7..29a7b6625 100644 --- a/src/API/ConsoleAPI.php +++ b/src/API/ConsoleAPI.php @@ -122,7 +122,8 @@ class ConsoleAPI{ case "help": if(isset($params[0]) and !is_numeric($params[0])){ $c = trim(strtolower($params[0])); - if(isset($this->help[$c])){ + if(isset($this->help[$c]) or isset($this->alias[$c])){ + $c = isset($this->help[$c]) ? $c : $this->alias[$c]; $output .= "Usage: /$c ".$this->help[$c]."\n"; break; } diff --git a/src/API/EntityAPI.php b/src/API/EntityAPI.php index 4381b5af4..3d8270d10 100644 --- a/src/API/EntityAPI.php +++ b/src/API/EntityAPI.php @@ -97,7 +97,7 @@ class EntityAPI{ $this->server->entities[$eid] = null; unset($this->server->entities[$eid]); $entity->closed = true; - $this->server->query("DELETE FROM entities WHERE EID = ".$entity->eid.";"); + $this->server->query("DELETE FROM entities WHERE EID = ".$eid.";"); $this->server->api->dhandle("entity.remove", $entity); $entity = null; unset($entity); diff --git a/src/Player.php b/src/Player.php index c20c9f4b8..cece3ff73 100644 --- a/src/Player.php +++ b/src/Player.php @@ -755,6 +755,7 @@ class Player{ $this->evid[] = $this->server->event("player.block.place", array($this, "eventHandler")); $this->evid[] = $this->server->event("tile.container.slot", array($this, "eventHandler")); $this->server->schedule(40, array($this, "measureLag"), array(), true); + console("[INFO] \x1b[33m".$this->username."\x1b[0m[/".$this->ip.":".$this->port."] logged in with entity id ".$this->eid." at (".round($this->entity->x, 2).", ".round($this->entity->y, 2).", ".round($this->entity->z, 2).")"); break; case MC_READY: if($this->loggedIn === false){ @@ -770,7 +771,6 @@ class Player{ $this->server->api->entity->spawnToAll($this->eid); $this->server->schedule(5, array($this->entity, "update"), array(), true); $this->server->api->dhandle("player.armor", array("eid" => $this->eid, "slot0" => ($this->armor[0][0] > 0 ? ($this->armor[0][0] - 256):AIR), "slot1" => ($this->armor[1][0] > 0 ? ($this->armor[1][0] - 256):AIR), "slot2" => ($this->armor[2][0] > 0 ? ($this->armor[2][0] - 256):AIR), "slot3" => ($this->armor[3][0] > 0 ? ($this->armor[3][0] - 256):AIR))); - console("[INFO] \x1b[33m".$this->username."\x1b[0m[/".$this->ip.":".$this->port."] logged in with entity id ".$this->eid." at (".round($this->entity->x, 2).", ".round($this->entity->y, 2).", ".round($this->entity->z, 2).")"); $this->eventHandler(new Container($this->server->motd), "server.chat"); if($this->MTU <= 548){ $this->eventHandler("Your connection is bad, you may experience lag and slow map loading.", "server.chat");