Fix rename command not updating the sign data file

This commit is contained in:
Daniel Saukel 2016-12-24 02:56:11 +01:00
parent fe97b932d7
commit 55ce71052f
2 changed files with 6 additions and 0 deletions

View File

@ -60,6 +60,7 @@ public class RenameCommand extends BRCommand {
resource.setName(args[2]); resource.setName(args[2]);
resource.getFolder().renameTo(new File(DungeonsXL.MAPS, args[2])); resource.getFolder().renameTo(new File(DungeonsXL.MAPS, args[2]));
resource.getSignData().updateFile(resource);
for (Dungeon dungeon : plugin.getDungeons().getDungeons()) { for (Dungeon dungeon : plugin.getDungeons().getDungeons()) {
DungeonConfig dConfig = dungeon.getConfig(); DungeonConfig dConfig = dungeon.getConfig();

View File

@ -19,6 +19,7 @@ package io.github.dre2n.dungeonsxl.config;
import io.github.dre2n.dungeonsxl.sign.DSign; import io.github.dre2n.dungeonsxl.sign.DSign;
import io.github.dre2n.dungeonsxl.world.DEditWorld; import io.github.dre2n.dungeonsxl.world.DEditWorld;
import io.github.dre2n.dungeonsxl.world.DGameWorld; import io.github.dre2n.dungeonsxl.world.DGameWorld;
import io.github.dre2n.dungeonsxl.world.DResourceWorld;
import java.io.File; import java.io.File;
import java.io.FileInputStream; import java.io.FileInputStream;
import java.io.FileOutputStream; import java.io.FileOutputStream;
@ -58,6 +59,10 @@ public class SignData {
return file; return file;
} }
public void updateFile(DResourceWorld resource) {
file = new File(resource.getFolder(), "DXLData.data");
}
/* Actions */ /* Actions */
/** /**
* Applies all signs from the file to the DEditWorld. * Applies all signs from the file to the DEditWorld.