Allow building inside spectators

This check is pretty ugly, it'll need cleaning up later. For now, this will suffice.
This commit is contained in:
Dylan K. Taylor 2017-09-03 13:47:44 +01:00
parent bb9299070d
commit 2398e2450a

View File

@ -1744,7 +1744,7 @@ class Level implements ChunkManager, Metadatable{
if($hand->isSolid() === true and $hand->getBoundingBox() !== null){
$entities = $this->getCollidingEntities($hand->getBoundingBox());
foreach($entities as $e){
if($e instanceof Arrow or $e instanceof DroppedItem){
if($e instanceof Arrow or $e instanceof DroppedItem or ($e instanceof Player and $e->isSpectator())){
continue;
}