mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-06 10:01:53 +00:00
Chat & Console fixes
This commit is contained in:
parent
fea6e9c432
commit
9b07994913
@ -56,7 +56,7 @@ class ChatAPI{
|
|||||||
if($issuer === "rcon"){
|
if($issuer === "rcon"){
|
||||||
$sender = "Rcon";
|
$sender = "Rcon";
|
||||||
}else{
|
}else{
|
||||||
$sender = "Console";
|
$sender = ucfirst($issuer);
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
$sender = $issuer->username;
|
$sender = $issuer->username;
|
||||||
@ -79,11 +79,8 @@ class ChatAPI{
|
|||||||
$target = $target->username;
|
$target = $target->username;
|
||||||
}else{
|
}else{
|
||||||
$target = strtolower($n);
|
$target = strtolower($n);
|
||||||
if($target === "server" or $target === "console" or $target === "rcon"){
|
if($t === "server" or $t === "console" or $t === "rcon"){
|
||||||
$target = "Console";
|
$target = "Console";
|
||||||
}else{
|
|
||||||
$output .= "Usage: /$cmd <player> <message>\n";
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$mes = implode(" ", $params);
|
$mes = implode(" ", $params);
|
||||||
|
@ -202,9 +202,9 @@ class ConsoleAPI{
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if($issuer instanceof Player){
|
if($issuer instanceof Player){
|
||||||
console("[INFO] \x1b[33m".$issuer->username."\x1b[0m issued server command: ".ltrim("$alias ")."/$cmd ".implode(" ", $params));
|
console("[DEBUG] \x1b[33m".$issuer->username."\x1b[0m issued server command: ".ltrim("$alias ")."/$cmd ".implode(" ", $params), true, true, 2);
|
||||||
}else{
|
}else{
|
||||||
console("[INFO] Issued server command: ".ltrim("$alias ")."/$cmd ".implode(" ", $params));
|
console("[DEBUG] \x1b[33m*".$issuer."\x1b[0m issued server command: ".ltrim("$alias ")."/$cmd ".implode(" ", $params), true, true, 2);
|
||||||
}
|
}
|
||||||
if($this->server->api->dhandle("console.command.".$cmd, array("cmd" => $cmd, "parameters" => $params, "issuer" => $issuer, "alias" => $alias)) === false
|
if($this->server->api->dhandle("console.command.".$cmd, array("cmd" => $cmd, "parameters" => $params, "issuer" => $issuer, "alias" => $alias)) === false
|
||||||
or $this->server->api->dhandle("console.command", array("cmd" => $cmd, "parameters" => $params, "issuer" => $issuer, "alias" => $alias)) === false){
|
or $this->server->api->dhandle("console.command", array("cmd" => $cmd, "parameters" => $params, "issuer" => $issuer, "alias" => $alias)) === false){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user