Skip to content

Commit

Permalink
just orElse is fine here
Browse files Browse the repository at this point in the history
  • Loading branch information
xGinko committed Mar 25, 2024
1 parent eb1d366 commit 5dcc238
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public static void sendMessage(@NotNull CommandSender sender, @NotNull Component
public static @NotNull Locale getLocale(@NotNull CommandSender sender) {
if (sender instanceof Player) {
return BetterWorldStats.getAudiences().player((Player) sender).pointers().get(Identity.LOCALE)
.orElseGet(() -> BetterWorldStats.getConfiguration().default_lang);
.orElse(BetterWorldStats.getConfiguration().default_lang);
} else {
return BetterWorldStats.getConfiguration().default_lang;
}
Expand Down

0 comments on commit 5dcc238

Please # to comment.