Skip to content

Commit

Permalink
Update ServerLinksPlus.java
Browse files Browse the repository at this point in the history
  • Loading branch information
Outfluencer authored Jun 12, 2024
1 parent deca8ac commit b3a72fe
Showing 1 changed file with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public void onLoad() {
} catch (IOException e) {
Map<String, String> defaultLinks = new TreeMap<>();
// Built-in
// report bug will also shown in error screens
// report bug will also be shown in error screens
// ServerLinks.LinkType.REPORT_BUG
for (ServerLinks.LinkType value : ServerLinks.LinkType.values()) {
defaultLinks.put(value.toString(), "https://" + value.name().toLowerCase() + ".com");
Expand All @@ -59,11 +59,8 @@ public void onLoad() {
buildIn = ServerLinks.LinkType.valueOf(key);
} catch (IllegalArgumentException ignored) {
}
if (buildIn == null) {
return new ServerLinks.Link(Either.right(TextComponent.fromLegacy(key)), config.getString(key));
} else {
return new ServerLinks.Link(Either.left(buildIn), config.getString(key));
}
return new ServerLinks.Link(buildIn == null ? Either.right(TextComponent.fromLegacy(key)) : Either.left(buildIn), config.getString(key));

}).toArray(ServerLinks.Link[]::new);
serverLinks = new ServerLinks(links);

Expand Down

0 comments on commit b3a72fe

Please sign in to comment.