From 3ee64194fc9d3cdb8d6e6922496b8d73e689c966 Mon Sep 17 00:00:00 2001 From: Daniel Saukel Date: Thu, 16 Jul 2020 19:01:58 +0200 Subject: [PATCH] Fix import command NPE; resolves #863 --- .../main/java/de/erethon/dungeonsxl/command/ImportCommand.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/main/java/de/erethon/dungeonsxl/command/ImportCommand.java b/core/src/main/java/de/erethon/dungeonsxl/command/ImportCommand.java index f654042e..e3ea1d1e 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/command/ImportCommand.java +++ b/core/src/main/java/de/erethon/dungeonsxl/command/ImportCommand.java @@ -73,7 +73,7 @@ public class ImportCommand extends DCommand { DResourceWorld resource = new DResourceWorld(plugin, args[1]); plugin.getDungeonRegistry().add(args[1], new DDungeon(plugin, resource)); - if (world.getEnvironment() != Environment.NORMAL) { + if (world != null && world.getEnvironment() != Environment.NORMAL) { WorldConfig config = resource.getConfig(true); config.setWorldEnvironment(world.getEnvironment()); config.save();