diff --git a/README.md b/README.md index 17099739..8d6eecac 100644 --- a/README.md +++ b/README.md @@ -55,7 +55,7 @@ Building DungeonsXL from source requires [Apache Maven](https://maven.apache.org Maven automatically fetches all dependencies and builds DungeonsXL; just run _build.bat_ or enter the command _mvn clean install_. #### DRECommons -[DRECommons](https://github.com/DRE2N/DRECommons) is a util library for common tasks. DungeonsXL contains DRECommons 4.1. +[DRECommons](https://github.com/DRE2N/DRECommons) is a util library for common tasks. DungeonsXL contains DRECommons 4.1.1. #### Caliburn API [Caliburn](https://github.com/DRE2N/CaliburnAPI) is an API to read custom items and mobs from config files. DungeonsXL contains Caliburn Beta 0.4. diff --git a/src/main/java/de/erethon/dungeonsxl/command/RenameCommand.java b/src/main/java/de/erethon/dungeonsxl/command/RenameCommand.java index fedeb61a..bceb2236 100644 --- a/src/main/java/de/erethon/dungeonsxl/command/RenameCommand.java +++ b/src/main/java/de/erethon/dungeonsxl/command/RenameCommand.java @@ -26,6 +26,7 @@ import de.erethon.dungeonsxl.global.GameSign; import de.erethon.dungeonsxl.global.GlobalProtection; import de.erethon.dungeonsxl.global.GroupSign; import de.erethon.dungeonsxl.player.DPermission; +import de.erethon.dungeonsxl.world.DEditWorld; import de.erethon.dungeonsxl.world.DResourceWorld; import java.io.File; import java.io.IOException; @@ -62,6 +63,12 @@ public class RenameCommand extends DRECommand { resource.getFolder().renameTo(new File(DungeonsXL.MAPS, args[2])); resource.getSignData().updateFile(resource); + for (DEditWorld editWorld : plugin.getDWorlds().getEditWorlds()) { + if (editWorld.getResource() == resource) { + editWorld.delete(true); + } + } + for (Dungeon dungeon : plugin.getDungeons().getDungeons()) { DungeonConfig dConfig = dungeon.getConfig(); FileConfiguration config = dConfig.getConfig();