mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-13 13:25:16 +00:00
Server: Account for later levels being unloaded by earlier levels' ticking function in checkTickUpdates()
should fix #2434 This happens when a plugin causes a level to be unloaded during an event fired on level tick.
This commit is contained in:
parent
7d0e631a75
commit
06c4f31db7
@ -2352,7 +2352,11 @@ class Server{
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Do level ticks
|
//Do level ticks
|
||||||
foreach($this->getLevels() as $level){
|
foreach($this->levels as $k => $level){
|
||||||
|
if(!isset($this->levels[$k])){
|
||||||
|
// Level unloaded during the tick of a level earlier in this loop, perhaps by plugin
|
||||||
|
continue;
|
||||||
|
}
|
||||||
if($level->getTickRate() > $this->baseTickRate and --$level->tickRateCounter > 0){
|
if($level->getTickRate() > $this->baseTickRate and --$level->tickRateCounter > 0){
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user