Player: Disallow modifying NBT of tiles inside spawn protection

This commit is contained in:
Dylan K. Taylor 2018-03-10 18:19:17 +00:00
parent a5e87484d9
commit 590826b9bd

View File

@ -2874,7 +2874,7 @@ class Player extends Human implements CommandSender, ChunkLoader, IPlayer{
$this->resetCraftingGridType();
$pos = new Vector3($packet->x, $packet->y, $packet->z);
if($pos->distanceSquared($this) > 10000){
if($pos->distanceSquared($this) > 10000 or $this->level->checkSpawnProtection($this, $pos)){
return true;
}