Simplify this code a little

This commit is contained in:
Sollace 2021-08-08 00:02:35 +02:00
parent 78dd2a93e8
commit 8fc9b8c2c1

View file

@ -50,9 +50,9 @@ class RacelistCommand {
translationKey += ".failed"; translationKey += ".failed";
} }
Text formattedName = new TranslatableText(race.name().toLowerCase()).styled(s -> s.withColor(Formatting.GOLD)); Text formattedName = new TranslatableText(race.name().toLowerCase()).formatted(Formatting.GOLD);
source.sendFeedback(new TranslatableText(translationKey, formattedName).styled(s -> s.withColor(Formatting.GREEN)), false); source.sendFeedback(new TranslatableText(translationKey, formattedName).formatted(Formatting.GREEN), false);
return 0; return 0;
} }
} }