mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-07 12:18:46 +00:00
Throw exception when null chunk is passed to a Tile/Entity
This commit is contained in:
parent
f60e2860e8
commit
7a5c583407
@ -147,7 +147,7 @@ abstract class Entity extends Position implements Metadatable{
|
|||||||
|
|
||||||
|
|
||||||
public function __construct(FullChunk $chunk, Compound $nbt){
|
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");
|
throw new \Exception("Invalid garbage Chunk given to Entity");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -64,7 +64,7 @@ abstract class Tile extends Position{
|
|||||||
public $tickTimer;
|
public $tickTimer;
|
||||||
|
|
||||||
public function __construct(FullChunk $chunk, Compound $nbt){
|
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");
|
throw new \Exception("Invalid garbage Chunk given to Tile");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user