diff --git a/BauSystem_Main/src/BauSystem.properties b/BauSystem_Main/src/BauSystem.properties index 47cf93ac..d8ed8e18 100644 --- a/BauSystem_Main/src/BauSystem.properties +++ b/BauSystem_Main/src/BauSystem.properties @@ -100,6 +100,9 @@ AUTOSTART_MESSAGE_RESULT2 = §eZeitdifferenz in ticks §7bis 60 Sekunden§8:§e AUTOSTART_MESSAGE_RESULT3 = §7Positiv, wenn zu wenig, negativ wenn zu viel # Backup +BACKUP_HELP_1=§7/backup create §8- §7Erstelle ein Backup der Region +BACKUP_HELP_2=§7/backup load §e[§7BackupName§e] §8- §7 Lade ein Backup +BACKUP_HELP_3=§7/backup list §8- §7Liste alle Backups der Region auf BACKUP_REGION_NO_REGION=§cDu bist in keiner Region BACKUP_NO_PERMS=§cDu darfst hier nicht das Backup System verwenden BACKUP_CREATE_SUCCESS=§7Das Backup wurde erstellt diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/backup/BackupCommand.java b/BauSystem_Main/src/de/steamwar/bausystem/features/backup/BackupCommand.java index 91e9ea53..b28fa438 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/backup/BackupCommand.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/backup/BackupCommand.java @@ -46,7 +46,9 @@ public class BackupCommand extends SWCommand { @Register(help = true) public void genericHelp(Player p, String... args) { BauSystem.MESSAGE.sendPrefixless("COMMAND_HELP_HEAD", p, "Backup"); - BauSystem.MESSAGE.sendPrefixless("DETONATOR_HELP_1", p); + BauSystem.MESSAGE.sendPrefixless("BACKUP_HELP_1", p); + BauSystem.MESSAGE.sendPrefixless("BACKUP_HELP_2", p); + BauSystem.MESSAGE.sendPrefixless("BACKUP_HELP_3", p); } static boolean checkGlobalRegion(Region region, Player p) { @@ -91,7 +93,7 @@ public class BackupCommand extends SWCommand { return; } - File backupFile = region.getBackupFile(backupName); + File backupFile = region.getBackupFile(backupName.replace('_', ' ')); if (backupFile == null) { BauSystem.MESSAGE.send("BACKUP_LOAD_FAILURE", p); return; @@ -108,7 +110,7 @@ public class BackupCommand extends SWCommand { } BauSystem.MESSAGE.send("BACKUP_LIST_HEAD", p); listBackup(p).forEach(s -> { - BauSystem.MESSAGE.send("BACKUP_LIST_ENTRY", p, "/backup load " + s, new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/backup load " + s), s); + BauSystem.MESSAGE.send("BACKUP_LIST_ENTRY", p, "/backup load " + s, new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/backup load " + s.replace('_', ' ')), s); }); } @@ -123,7 +125,7 @@ public class BackupCommand extends SWCommand { return Collections.emptyList(); } try { - return region.listBackup().stream().map(s -> s.substring(0, s.length() - 6)).collect(Collectors.toList()); + return region.listBackup().stream().map(s -> s.substring(0, s.length() - 6).replace(' ', '_')).collect(Collectors.toList()); } catch (NullPointerException e) { return Collections.emptyList(); }