TCheckpoint

This commit is contained in:
tyuXX 2025-06-29 15:07:33 +03:00
parent 9ae9bf64e7
commit 665447b178
26 changed files with 33 additions and 39 deletions

View file

@ -10,6 +10,7 @@ import org.gsdistance.grimmsServer.Constructable.WorldConstructor;
import org.gsdistance.grimmsServer.GrimmsServer;
import java.util.List;
import java.util.Objects;
import static org.gsdistance.grimmsServer.Config.ActiveConfig.getConfigValue;
@ -64,7 +65,8 @@ public class DynamicDimensionGen {
public static void unLoadWorlds() {
Stopwatch sw = Stopwatch.createStarted();
GrimmsServer.logger.info("Unloading worlds...");
for (String worldName : (List<String>) getConfigValue(ConfigKey.DISABLED_DIMENSIONS, List.class)) {
//noinspection unchecked
for (String worldName : (List<String>) Objects.requireNonNull(getConfigValue(ConfigKey.DISABLED_DIMENSIONS, List.class))) {
World world = Bukkit.getWorld(worldName);
if (world != null) {
GrimmsServer.logger.info("Unloading world: " + worldName);