Archiviert
1
0

Fix Message again for the final time!

Dieser Commit ist enthalten in:
yoyosource 2022-03-15 17:18:16 +01:00
Ursprung 01b500e2e7
Commit 9accdb599e

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