Improved unloaded tile entity handling

This commit is contained in:
Shoghi Cervantes
2014-08-27 18:18:33 +02:00
parent 9e5e4fb362
commit e473cd5e67
3 changed files with 6 additions and 2 deletions

View File

@ -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);