mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-04 09:10:00 +00:00
Fix crash bug when @all is used in console.
This commit is contained in:
parent
386b2cb0ef
commit
0ad0071107
@ -204,6 +204,8 @@ class ConsoleAPI{
|
|||||||
break;
|
break;
|
||||||
case "a":
|
case "a":
|
||||||
case "all":
|
case "all":
|
||||||
|
if($issuer instanceof Player)
|
||||||
|
{
|
||||||
if($this->server->api->ban->isOp($issuer->username))
|
if($this->server->api->ban->isOp($issuer->username))
|
||||||
{
|
{
|
||||||
$output = "";
|
$output = "";
|
||||||
@ -215,6 +217,14 @@ class ConsoleAPI{
|
|||||||
{
|
{
|
||||||
$issuer->sendChat("You don't have permissions to use this command.\n");
|
$issuer->sendChat("You don't have permissions to use this command.\n");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$output = "";
|
||||||
|
foreach($this->server->api->player->getAll() as $p){
|
||||||
|
$output .= $this->run($cmd . " ". substr_replace($params, $p->username, $selector[1] + $offsetshift - 1, strlen($selector[0]) + 1), $issuer, $alias);
|
||||||
|
}
|
||||||
|
}
|
||||||
return $output;
|
return $output;
|
||||||
case "r":
|
case "r":
|
||||||
case "random":
|
case "random":
|
||||||
|
Loading…
x
Reference in New Issue
Block a user