mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-04 17:06:16 +00:00
Improved chunk saving times by not marking it as changed when Players are added/removed
This commit is contained in:
@ -244,12 +244,16 @@ abstract class BaseFullChunk implements FullChunk{
|
||||
|
||||
public function addEntity(Entity $entity){
|
||||
$this->entities[$entity->getId()] = $entity;
|
||||
$this->hasChanged = true;
|
||||
if(!($entity instanceof Player)){
|
||||
$this->hasChanged = true;
|
||||
}
|
||||
}
|
||||
|
||||
public function removeEntity(Entity $entity){
|
||||
unset($this->entities[$entity->getId()]);
|
||||
$this->hasChanged = true;
|
||||
if(!($entity instanceof Player)){
|
||||
$this->hasChanged = true;
|
||||
}
|
||||
}
|
||||
|
||||
public function addTile(Tile $tile){
|
||||
|
Reference in New Issue
Block a user