@ -56,7 +56,7 @@ public final class TimeFormatter {
|
||||
String text = BlacksmithPlugin.getTranslator().getTranslatedMessage(BlacksmithTranslatableMessage.valueOf(interval.name()));
|
||||
|
||||
//Choose a random entry if a comma-separated list is provided
|
||||
if (text != null && text.contains(",")) {
|
||||
if (text.contains(",")) {
|
||||
String[] parts = text.split(",");
|
||||
String randomPart = parts[new Random().nextInt(parts.length)];
|
||||
if (randomPart != null) {
|
||||
@ -65,7 +65,7 @@ public final class TimeFormatter {
|
||||
}
|
||||
|
||||
//Use the set message, or use the default
|
||||
if (text != null && !text.trim().isEmpty()) {
|
||||
if (!text.trim().isEmpty()) {
|
||||
return text;
|
||||
} else {
|
||||
return interval.getDefaultText();
|
||||
|
Reference in New Issue
Block a user