SteamWar/SpigotCore
Archiviert
13
0

Fix resourceBundleLoading

Dieser Commit ist enthalten in:
Lixfel 2020-12-18 15:48:34 +01:00
Ursprung aebd4dde1b
Commit 4c290d5d3c

Datei anzeigen

@ -35,9 +35,11 @@ import java.util.ResourceBundle;
public class Message {
private final String resourceBundleName;
private final ClassLoader classLoader;
public Message(String resourceBundleName){
public Message(String resourceBundleName, ClassLoader classLoader){
this.resourceBundleName = resourceBundleName;
this.classLoader = classLoader;
}
/* Parsing input to a message */
@ -61,7 +63,7 @@ public class Message {
else
locale = Locale.getDefault();
ResourceBundle resourceBundle = ResourceBundle.getBundle(resourceBundleName, locale);
ResourceBundle resourceBundle = ResourceBundle.getBundle(resourceBundleName, locale, classLoader);
String pattern = "";
if(prefixed)
pattern = resourceBundle.getObject("PREFIX") + " ";