mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-22 08:44:01 +00:00
Allow looking the help of an alias
This commit is contained in:
parent
f1cb29cc8b
commit
3d48eec887
@ -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;
|
||||
}
|
||||
|
@ -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);
|
||||
|
@ -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");
|
||||
|
Loading…
x
Reference in New Issue
Block a user