diff --git a/src/main/java/net/slqmy/template_paper_plugin/data/player/PlayerDataManager.java b/src/main/java/net/slqmy/template_paper_plugin/data/player/PlayerDataManager.java index d9b4d35f..8f97f1f2 100644 --- a/src/main/java/net/slqmy/template_paper_plugin/data/player/PlayerDataManager.java +++ b/src/main/java/net/slqmy/template_paper_plugin/data/player/PlayerDataManager.java @@ -19,6 +19,8 @@ public class PlayerDataManager { private final TemplatePaperPlugin plugin; + private final String playerDataFilesExtension = ".json"; + private final String playerDataFolderName = "player-data"; private final String playerDataFolderPath; private final File playerDataFolder; @@ -79,7 +81,7 @@ public void save() { UUID uuid = entry.getKey(); PlayerProfile profile = entry.getValue(); - File file = new File(playerDataFolderPath + File.separator + uuid.toString() + ".json"); + File file = new File(playerDataFolderPath + File.separator + uuid.toString() + playerDataFilesExtension); FileWriter writer; diff --git a/src/main/java/net/slqmy/template_paper_plugin/file/FileUtil.java b/src/main/java/net/slqmy/template_paper_plugin/file/FileUtil.java index 1533bf9b..c59892ac 100644 --- a/src/main/java/net/slqmy/template_paper_plugin/file/FileUtil.java +++ b/src/main/java/net/slqmy/template_paper_plugin/file/FileUtil.java @@ -19,10 +19,16 @@ public class FileUtil { private static final String FILE_EXTENSION_SEPARATOR = "."; + private static final String FILE_MIME_TYPE_TYPE_SUBTYPE_SEPARATOR = "/"; + public static String getFileExtensionSeparator() { return FILE_EXTENSION_SEPARATOR; } + public static String getFileMimeTypeTypeSubtypeSeparator() { + return FILE_MIME_TYPE_TYPE_SUBTYPE_SEPARATOR; + } + public static List getResourceFileFolderResourceFilePaths(String resourceFileFolderPath) throws IOException { ClassLoader classLoader = FileUtil.class.getClassLoader(); diff --git a/src/main/java/net/slqmy/template_paper_plugin/language/LanguageManager.java b/src/main/java/net/slqmy/template_paper_plugin/language/LanguageManager.java index 9cf26c5a..4170bc6f 100644 --- a/src/main/java/net/slqmy/template_paper_plugin/language/LanguageManager.java +++ b/src/main/java/net/slqmy/template_paper_plugin/language/LanguageManager.java @@ -25,6 +25,8 @@ public class LanguageManager { private final TemplatePaperPlugin plugin; + private final String languageMessageFilesExtension = ".yaml"; + private final String languagesFolderName = "languages"; private final String languagesFolderPath; private final File languagesFolder; @@ -62,7 +64,7 @@ private void loadLanguageMessages() { for (File languageMessagesFile : languagesFolder.listFiles()) { String languageName = languageMessagesFile.getName().split("\\.", 2)[0]; - String languageMessagesResourcePath = languagesFolderName + File.separator + languageName + ".yaml"; + String languageMessagesResourcePath = languagesFolderName + File.separator + languageName + languageMessageFilesExtension; plugin.saveResource(languageMessagesResourcePath, false); YamlConfiguration messagesConfiguration = YamlConfiguration.loadConfiguration(languageMessagesFile); diff --git a/src/main/java/net/slqmy/template_paper_plugin/resource_pack/ResourcePackManager.java b/src/main/java/net/slqmy/template_paper_plugin/resource_pack/ResourcePackManager.java index de8f326c..c588a3a9 100644 --- a/src/main/java/net/slqmy/template_paper_plugin/resource_pack/ResourcePackManager.java +++ b/src/main/java/net/slqmy/template_paper_plugin/resource_pack/ResourcePackManager.java @@ -15,7 +15,7 @@ public class ResourcePackManager { private final String resourcePackFileType = "application"; private final String resourcePackFileExtension = "zip"; - private final String resourcePackFileMimeType = resourcePackFileType + "/" + resourcePackFileExtension; + private final String resourcePackFileMimeType = resourcePackFileType + FileUtil.getFileMimeTypeTypeSubtypeSeparator() + resourcePackFileExtension; private String resourcePackZipFilePath; private File resourcePackZipFile;