Fix memory leak when unloading worlds

The World instance wasn't freed from the forceSpawnMap and
preventSpawnMap, keeping unloaded worlds around.
This commit is contained in:
michael 2020-04-09 18:27:34 -07:00
parent 02d9b310a4
commit a897b0b94b

View file

@ -561,6 +561,8 @@ public class GenericHandler {
filledHandMapMap.remove(world); filledHandMapMap.remove(world);
attackTaskMapMap.remove(world); attackTaskMapMap.remove(world);
targetTaskMapMap.remove(world); targetTaskMapMap.remove(world);
forceSpawnMap.remove(world);
preventSpawnMap.remove(world);
PotionEventHandlers.flightListMap.remove(world); PotionEventHandlers.flightListMap.remove(world);
PotionEventHandlers.noGravityListMap.remove(world); PotionEventHandlers.noGravityListMap.remove(world);
} }