mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-10-18 20:14:31 +00:00
Moved chunk garbage collector to memory manager
This commit is contained in:
@@ -1707,10 +1707,6 @@ class Server{
|
||||
$this->scheduler->scheduleDelayedRepeatingTask(new CallbackTask([$this, "doAutoSave"]), $this->getProperty("ticks-per.autosave", 6000), $this->getProperty("ticks-per.autosave", 6000));
|
||||
}
|
||||
|
||||
if($this->getProperty("chunk-gc.period-in-ticks", 600) > 0){
|
||||
$this->scheduler->scheduleDelayedRepeatingTask(new CallbackTask([$this, "doLevelGC"]), $this->getProperty("chunk-gc.period-in-ticks", 600), $this->getProperty("chunk-gc.period-in-ticks", 600));
|
||||
}
|
||||
|
||||
$this->enablePlugins(PluginLoadOrder::POSTWORLD);
|
||||
|
||||
$this->start();
|
||||
@@ -2223,12 +2219,6 @@ class Server{
|
||||
}
|
||||
}
|
||||
|
||||
public function doLevelGC(){
|
||||
foreach($this->getLevels() as $level){
|
||||
$level->doChunkGarbageCollection();
|
||||
}
|
||||
}
|
||||
|
||||
public function sendUsage(){
|
||||
if($this->lastSendUsage instanceof SendUsageTask){
|
||||
if(!$this->lastSendUsage->isGarbage()){ //do not call multiple times
|
||||
|
Reference in New Issue
Block a user