Rename classes

This commit is contained in:
filoghost 2020-08-15 20:37:29 +02:00
parent 7fa48ac3c4
commit 4faee01be5
3 changed files with 8 additions and 8 deletions

View File

@ -11,9 +11,9 @@ import me.filoghost.chestcommands.legacy.upgrade.Upgrade;
import me.filoghost.chestcommands.legacy.upgrade.UpgradeTask;
import me.filoghost.chestcommands.legacy.upgrade.UpgradeTaskException;
import me.filoghost.chestcommands.legacy.v4_0.v4_0_LangUpgradeTask;
import me.filoghost.chestcommands.legacy.v4_0.v4_0_MenuNodeReformatUpgradeTask;
import me.filoghost.chestcommands.legacy.v4_0.v4_0_MenuNodeRenameUpgradeTask;
import me.filoghost.chestcommands.legacy.v4_0.v4_0_PlaceholdersFileUpgradeTask;
import me.filoghost.chestcommands.legacy.v4_0.v4_0_MenuReformatUpgradeTask;
import me.filoghost.chestcommands.legacy.v4_0.v4_0_PlaceholdersUpgradeTask;
import me.filoghost.chestcommands.legacy.v4_0.v4_0_SettingsUpgradeTask;
import me.filoghost.chestcommands.logging.Errors;
import me.filoghost.commons.collection.CollectionUtils;
@ -40,12 +40,12 @@ public class UpgradeList {
multiTaskUpgrade("v4.0-menus-reformat", (configManager) -> {
String legacyCommandSeparator = readLegacyCommandSeparator(configManager);
return createMenuTasks(configManager,
file -> new v4_0_MenuNodeReformatUpgradeTask(configManager, file, legacyCommandSeparator));
file -> new v4_0_MenuReformatUpgradeTask(configManager, file, legacyCommandSeparator));
}),
// Upgrade config after reading the command separator for menus
singleTaskUpgrade("v4.0-config", v4_0_SettingsUpgradeTask::new),
singleTaskUpgrade("v4.0-placeholders", v4_0_PlaceholdersFileUpgradeTask::new),
singleTaskUpgrade("v4.0-placeholders", v4_0_PlaceholdersUpgradeTask::new),
singleTaskUpgrade("v4.0-lang", v4_0_LangUpgradeTask::new)
);

View File

@ -20,11 +20,11 @@ import java.util.Collections;
import java.util.List;
import java.util.regex.Pattern;
public class v4_0_MenuNodeReformatUpgradeTask extends YamlUpgradeTask {
public class v4_0_MenuReformatUpgradeTask extends YamlUpgradeTask {
private final String legacyCommandSeparator;
public v4_0_MenuNodeReformatUpgradeTask(ConfigManager configManager, Path menuFile, String legacyCommandSeparator) {
public v4_0_MenuReformatUpgradeTask(ConfigManager configManager, Path menuFile, String legacyCommandSeparator) {
super(configManager.getConfigLoader(menuFile));
this.legacyCommandSeparator = legacyCommandSeparator;
}

View File

@ -20,13 +20,13 @@ import java.nio.file.Files;
import java.nio.file.Path;
import java.util.List;
public class v4_0_PlaceholdersFileUpgradeTask extends UpgradeTask {
public class v4_0_PlaceholdersUpgradeTask extends UpgradeTask {
private final Path oldPlaceholdersFile;
private final ConfigLoader newPlaceholdersConfigLoader;
private Config updatedConfig;
public v4_0_PlaceholdersFileUpgradeTask(ConfigManager configManager) {
public v4_0_PlaceholdersUpgradeTask(ConfigManager configManager) {
this.oldPlaceholdersFile = configManager.getRootDataFolder().resolve("placeholders.yml");
this.newPlaceholdersConfigLoader = configManager.getConfigLoader("custom-placeholders.yml");
}