This commit is contained in:
Dylan K. Taylor 2017-10-24 13:29:02 +01:00
parent 6daa0135d5
commit a82efc44aa

View File

@ -2626,7 +2626,7 @@ class Player extends Human implements CommandSender, ChunkLoader, IPlayer{
$target = $this->level->getBlock($pos);
$ev = new PlayerInteractEvent($this, $this->inventory->getItemInHand(), $target, $packet->face, $target->getId() === 0 ? PlayerInteractEvent::LEFT_CLICK_AIR : PlayerInteractEvent::LEFT_CLICK_BLOCK);
if(!$this->level->checkSpawnProtection($this, $target)){
if($this->level->checkSpawnProtection($this, $target)){
$ev->setCancelled();
}