SteamWar/BungeeCore
Archiviert
13
2

Maybe fix resource bundle #312

Zusammengeführt
Lixfel hat 4 Commits von MaybeFixResouceBundle nach master 2022-03-15 15:04:56 +01:00 zusammengeführt
Nur Änderungen aus Commit 9047c8ef6a werden angezeigt - Alle Commits anzeigen

Datei anzeigen

@ -44,7 +44,7 @@ public class Message {
@Override
public boolean needsReload(String baseName, Locale locale, String format, ClassLoader loader, ResourceBundle bundle, long loadTime) {
return System.currentTimeMillis() - loadTime > 60000; //Reload if older than 1 minute
return true;
}
};
@ -71,7 +71,9 @@ public class Message {
private static String parse(String message, boolean prefixed, Locale locale, Object... params){
if(locale == null)
locale = Locale.getDefault();
System.out.println("parse " + message + " " + locale);
ResourceBundle resourceBundle = ResourceBundle.getBundle("de.steamwar.messages.BungeeCore", locale, CONTROL);
System.out.println(resourceBundle);
String pattern = "";
if(prefixed)
pattern = resourceBundle.getObject("PREFIX") + " ";