mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-08 02:42:58 +00:00
Improved unloaded tile entity handling
This commit is contained in:
@ -54,6 +54,10 @@ abstract class Spawnable extends Tile{
|
||||
}
|
||||
|
||||
public function spawnToAll(){
|
||||
if($this->closed){
|
||||
return;
|
||||
}
|
||||
|
||||
foreach($this->getLevel()->getPlayers() as $player){
|
||||
if($player->spawned === true){
|
||||
$this->spawnTo($player);
|
||||
|
@ -70,7 +70,7 @@ abstract class Tile extends Position{
|
||||
|
||||
$this->server = $chunk->getProvider()->getLevel()->getServer();
|
||||
$this->chunk = $chunk;
|
||||
$this->setLevel($chunk->getProvider()->getLevel(), true); //Strong reference
|
||||
$this->setLevel($chunk->getProvider()->getLevel());
|
||||
$this->namedtag = $nbt;
|
||||
$this->closed = false;
|
||||
$this->name = "";
|
||||
|
Reference in New Issue
Block a user