Independent TLocale loading priority & en_US for TabooLib

This commit is contained in:
Arasple
2020-01-13 16:28:25 +08:00
parent 08520e1afb
commit 7cf9fcf1a5
4 changed files with 83 additions and 16 deletions

View File

@@ -87,8 +87,8 @@ public class SimpleI18n {
}
private static File getLocaleFile(Plugin plugin) {
TLocaleLoader.getLocalePriority().forEach(localeName -> Files.releaseResource(plugin, "simpleI18n/" + getVersion() + "/" + localeName + ".yml", false));
return TLocaleLoader.getLocalePriority().stream().map(localeName -> new File("plugins/TabooLib/simpleI18n/" + getVersion() + "/" + localeName + ".yml")).filter(File::exists).findFirst().orElse(null);
TLocaleLoader.getLocalePriority(plugin).forEach(localeName -> Files.releaseResource(plugin, "simpleI18n/" + getVersion() + "/" + localeName + ".yml", false));
return TLocaleLoader.getLocalePriority(plugin).stream().map(localeName -> new File("plugins/TabooLib/simpleI18n/" + getVersion() + "/" + localeName + ".yml")).filter(File::exists).findFirst().orElse(null);
}
private static String getVersion() {