From c2a0be6effd9fad71d7d5f80d26f6174f375ad89 Mon Sep 17 00:00:00 2001 From: Daniel Saukel Date: Sat, 23 Oct 2021 01:43:06 +0200 Subject: [PATCH] Dev mode only MFDs --- .../java/de/erethon/dungeonsxl/DungeonsXL.java | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/core/src/main/java/de/erethon/dungeonsxl/DungeonsXL.java b/core/src/main/java/de/erethon/dungeonsxl/DungeonsXL.java index 3fdbbe99..2ad91978 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/DungeonsXL.java +++ b/core/src/main/java/de/erethon/dungeonsxl/DungeonsXL.java @@ -331,15 +331,19 @@ public class DungeonsXL extends DREPlugin implements DungeonsAPI { dungeonRegistry.add(resource.getName(), new DDungeon(this, resource)); } // Dungeons - Linked dungeons - for (File file : DUNGEONS.listFiles()) { - Dungeon dungeon = DDungeon.create(this, file); + if (xlDevMode) { + for (File file : DUNGEONS.listFiles()) { + Dungeon dungeon = DDungeon.create(this, file); - if (dungeon != null) { - dungeonRegistry.add(dungeon.getName(), dungeon); - } else { - MessageUtil.log(this, "&4The setup of dungeon &6" + file.getName() - + "&4 is incorrect. See https://github.com/DRE2N/DungeonsXL/wiki/dungeon-configuration for reference."); + if (dungeon != null) { + dungeonRegistry.add(dungeon.getName(), dungeon); + } else { + MessageUtil.log(this, "&4The setup of dungeon &6" + file.getName() + + "&4 is incorrect. See https://github.com/DRE2N/DungeonsXL/wiki/dungeon-configuration for reference."); + } } + } else if (DUNGEONS.listFiles().length != 0) { + MessageUtil.log(this, "&4Multi floor dungeons are not part of the range of functions of this build."); } // Raw map to copy if (!DResourceWorld.RAW.exists()) {