diff --git a/core/src/main/java/io/github/dre2n/dungeonsxl/command/RenameCommand.java b/core/src/main/java/io/github/dre2n/dungeonsxl/command/RenameCommand.java index e65b4ef4..7070c3c7 100644 --- a/core/src/main/java/io/github/dre2n/dungeonsxl/command/RenameCommand.java +++ b/core/src/main/java/io/github/dre2n/dungeonsxl/command/RenameCommand.java @@ -60,6 +60,7 @@ public class RenameCommand extends BRCommand { resource.setName(args[2]); resource.getFolder().renameTo(new File(DungeonsXL.MAPS, args[2])); + resource.getSignData().updateFile(resource); for (Dungeon dungeon : plugin.getDungeons().getDungeons()) { DungeonConfig dConfig = dungeon.getConfig(); diff --git a/core/src/main/java/io/github/dre2n/dungeonsxl/config/SignData.java b/core/src/main/java/io/github/dre2n/dungeonsxl/config/SignData.java index 733a2307..a40823c3 100644 --- a/core/src/main/java/io/github/dre2n/dungeonsxl/config/SignData.java +++ b/core/src/main/java/io/github/dre2n/dungeonsxl/config/SignData.java @@ -19,6 +19,7 @@ package io.github.dre2n.dungeonsxl.config; import io.github.dre2n.dungeonsxl.sign.DSign; import io.github.dre2n.dungeonsxl.world.DEditWorld; import io.github.dre2n.dungeonsxl.world.DGameWorld; +import io.github.dre2n.dungeonsxl.world.DResourceWorld; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; @@ -58,6 +59,10 @@ public class SignData { return file; } + public void updateFile(DResourceWorld resource) { + file = new File(resource.getFolder(), "DXLData.data"); + } + /* Actions */ /** * Applies all signs from the file to the DEditWorld.