Moved chunk garbage collector to memory manager

This commit is contained in:
Shoghi Cervantes
2015-04-19 16:14:54 +02:00
parent 05385acb36
commit bf4a8398c4
3 changed files with 12 additions and 13 deletions

View File

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