mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-20 16:00:20 +00:00
Chat & Console fixes
This commit is contained in:
parent
fea6e9c432
commit
9b07994913
@ -56,7 +56,7 @@ class ChatAPI{
|
||||
if($issuer === "rcon"){
|
||||
$sender = "Rcon";
|
||||
}else{
|
||||
$sender = "Console";
|
||||
$sender = ucfirst($issuer);
|
||||
}
|
||||
}else{
|
||||
$sender = $issuer->username;
|
||||
@ -79,11 +79,8 @@ class ChatAPI{
|
||||
$target = $target->username;
|
||||
}else{
|
||||
$target = strtolower($n);
|
||||
if($target === "server" or $target === "console" or $target === "rcon"){
|
||||
if($t === "server" or $t === "console" or $t === "rcon"){
|
||||
$target = "Console";
|
||||
}else{
|
||||
$output .= "Usage: /$cmd <player> <message>\n";
|
||||
break;
|
||||
}
|
||||
}
|
||||
$mes = implode(" ", $params);
|
||||
|
@ -202,9 +202,9 @@ class ConsoleAPI{
|
||||
return;
|
||||
}
|
||||
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{
|
||||
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
|
||||
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