mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-22 08:44:01 +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
|
||||
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){
|
||||
continue;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user