Throw exception when null chunk is passed to a Tile/Entity

This commit is contained in:
Shoghi Cervantes 2014-08-15 16:04:48 +02:00
parent f60e2860e8
commit 7a5c583407
2 changed files with 2 additions and 2 deletions

View File

@ -147,7 +147,7 @@ abstract class Entity extends Position implements Metadatable{
public function __construct(FullChunk $chunk, Compound $nbt){
if($chunk->getProvider() === null){
if($chunk === null or $chunk->getProvider() === null){
throw new \Exception("Invalid garbage Chunk given to Entity");
}

View File

@ -64,7 +64,7 @@ abstract class Tile extends Position{
public $tickTimer;
public function __construct(FullChunk $chunk, Compound $nbt){
if($chunk->getProvider() === null){
if($chunk === null or $chunk->getProvider() === null){
throw new \Exception("Invalid garbage Chunk given to Tile");
}