mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-17 03:08:58 +00:00
Merge pull request #3087 from PEMapModder/patch-6
Block break optimization
This commit is contained in:
commit
9541c9751b
@ -1417,9 +1417,7 @@ class Level implements ChunkManager, Metadatable{
|
||||
|
||||
if($player->isSurvival() and $item instanceof Item and !$target->isBreakable($item)){
|
||||
$ev->setCancelled();
|
||||
}
|
||||
|
||||
if(!$player->isOp() and ($distance = $this->server->getSpawnRadius()) > -1){
|
||||
}elseif(!$player->isOp() and ($distance = $this->server->getSpawnRadius()) > -1){
|
||||
$t = new Vector2($target->x, $target->z);
|
||||
$s = new Vector2($this->getSpawnLocation()->x, $this->getSpawnLocation()->z);
|
||||
if(count($this->server->getOps()->getAll()) > 0 and $t->distance($s) <= $distance){ //set it to cancelled so plugins can bypass this
|
||||
|
Loading…
x
Reference in New Issue
Block a user