SteamWar/BungeeCore
Archiviert
13
2

Fix Message again for the final time! #313

Zusammengeführt
Lixfel hat 11 Commits von ResourceBundles2.0 nach master 2022-03-16 16:38:46 +01:00 zusammengeführt
Nur Änderungen aus Commit 9accdb599e werden angezeigt - Alle Commits anzeigen

Datei anzeigen

@ -73,7 +73,7 @@ public class Message {
}
}
private static ResourceBundle createResourceBundle(String baseName, Locale locale) {
private static ResourceBundle getResourceBundle(String baseName, Locale locale) {
return bundles.computeIfAbsent(locale, l -> {
String path = baseName.replace('.', '/');
return createSingle("/" + path + "_" + locale.toString() + ".properties")
@ -86,7 +86,7 @@ public class Message {
private static String parse(String message, boolean prefixed, Locale locale, Object... params){
if(locale == null)
locale = Locale.getDefault();
ResourceBundle resourceBundle = createResourceBundle("de.steamwar.messages.BungeeCore", locale);
ResourceBundle resourceBundle = getResourceBundle("de.steamwar.messages.BungeeCore", locale);
String pattern = "";
if(prefixed)
pattern = resourceBundle.getObject("PREFIX") + " ";