This commit is contained in:
Shoghi Cervantes 2014-01-28 11:36:18 +01:00
parent 763adb0360
commit 4002d3013d
8 changed files with 21 additions and 26 deletions

View File

@ -207,22 +207,16 @@ class ConsoleAPI{
break; break;
case "a": case "a":
case "all": case "all":
if($issuer instanceof Player) if($issuer instanceof Player){
{ if($this->server->api->ban->isOp($issuer->username)){
if($this->server->api->ban->isOp($issuer->username))
{
$output = ""; $output = "";
foreach($this->server->api->player->getAll() as $p){ 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); $output .= $this->run($cmd . " ". substr_replace($params, $p->username, $selector[1] + $offsetshift - 1, strlen($selector[0]) + 1), $issuer, $alias);
} }
} }else{
else
{
$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{
else
{
$output = ""; $output = "";
foreach($this->server->api->player->getAll() as $p){ 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); $output .= $this->run($cmd . " ". substr_replace($params, $p->username, $selector[1] + $offsetshift - 1, strlen($selector[0]) + 1), $issuer, $alias);

View File

@ -467,14 +467,15 @@ class PMFLevel extends PMF{
++$this->chunkChange[$index][$Y]; ++$this->chunkChange[$index][$Y];
} }
$this->chunkChange[$index][-1] = true; $this->chunkChange[$index][-1] = true;
if($old_b instanceof LiquidBlock) if($old_b instanceof LiquidBlock){
{
$pos = new Position($x, $y, $z, $this->level); $pos = new Position($x, $y, $z, $this->level);
for($side = 0; $side <= 5; ++$side) for($side = 0; $side <= 5; ++$side){
{
$b = $pos->getSide($side); $b = $pos->getSide($side);
if($b instanceof LavaBlock) { ServerAPI::request()->api->block->scheduleBlockUpdate(new Position($b, 0, 0, $this->level), 40, BLOCK_UPDATE_NORMAL); } if($b instanceof LavaBlock){
else { ServerAPI::request()->api->block->scheduleBlockUpdate(new Position($b, 0, 0, $this->level), 10, BLOCK_UPDATE_NORMAL); } ServerAPI::request()->api->block->scheduleBlockUpdate(new Position($b, 0, 0, $this->level), 40, BLOCK_UPDATE_NORMAL);
}else{
ServerAPI::request()->api->block->scheduleBlockUpdate(new Position($b, 0, 0, $this->level), 10, BLOCK_UPDATE_NORMAL);
}
} }
} }
return true; return true;