Test ttl
Signed-off-by: Lixfel <agga-games@gmx.de>
Dieser Commit ist enthalten in:
Ursprung
e9b8940de0
Commit
fa60eeb121
@ -34,6 +34,13 @@ import java.util.ResourceBundle;
|
||||
|
||||
public class Message {
|
||||
|
||||
private static final ResourceBundle.Control CONTROL = new ResourceBundle.Control() {
|
||||
@Override
|
||||
public long getTimeToLive(String arg0, Locale arg1) {
|
||||
return 60000; //Cache only 1 minute
|
||||
}
|
||||
};
|
||||
|
||||
public static TextComponent parseToComponent(String message, boolean prefixed, CommandSender sender, Object... params){
|
||||
return new TextComponent(TextComponent.fromLegacyText(parse(message, prefixed, sender, params)));
|
||||
}
|
||||
@ -53,7 +60,7 @@ public class Message {
|
||||
if(locale == null)
|
||||
locale = Locale.getDefault();
|
||||
|
||||
ResourceBundle resourceBundle = ResourceBundle.getBundle("de.steamwar.messages.BungeeCore", locale);
|
||||
ResourceBundle resourceBundle = ResourceBundle.getBundle("de.steamwar.messages.BungeeCore", locale, CONTROL);
|
||||
String pattern = "";
|
||||
if(prefixed)
|
||||
pattern = resourceBundle.getObject("PREFIX") + " ";
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren