mirror of
https://github.com/DRE2N/DungeonsXL.git
synced 2024-11-04 17:59:31 +01:00
Remove edit instances before renaming a world; resolves #368
This commit is contained in:
parent
b73b7d5554
commit
7e65ff1ebc
@ -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.
|
||||
|
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user