mirror of
https://github.com/darksaid98/Carbon.git
synced 2026-12-01 14:38:48 +00:00
Set default instead of null check
This commit is contained in:
1 parent
33f907e237
commit
f7077316b1
1 file changed
+3
-7
@@ -86,13 +86,9 @@ public class ChannelListCommand extends BaseCommand {
|
||||
}
|
||||
|
||||
private void makeList(Iterator<ChatChannel> iterator, TextComponent.Builder list) {
|
||||
String listSeparator = carbonChat.getLanguage().getString("channel-list-separator");
|
||||
Component listSeparatorComponent;
|
||||
if (listSeparator != null) {
|
||||
listSeparatorComponent = TextComponent.of(listSeparator);
|
||||
} else {
|
||||
listSeparatorComponent = TextComponent.of(", ");
|
||||
}
|
||||
String listSeparator = carbonChat.getLanguage().getString("channel-list-separator", ", ");
|
||||
Component listSeparatorComponent = listSeparatorComponent = TextComponent.of(listSeparator);
|
||||
|
||||
while (iterator.hasNext()) {
|
||||
ChatChannel channel = iterator.next();
|
||||
list.append(TextComponent.of(channel.getName()));
|
||||
|
||||
Reference in new issue
Block a user