refactor: else branch not necessary

This commit is contained in:
aro 2023-01-23 10:07:40 +01:00
parent ffb50e8391
commit d9dca0c0cc

View file

@ -44,6 +44,10 @@ public class NickoExpansion extends PlaceholderExpansion {
String name, skin, locale;
boolean bungeecord;
name = skin = player.getName();
locale = "N/A";
bungeecord = true;
final Optional<NickoProfile> optionalProfile = instance.getDataStore().getData(player.getUniqueId());
if (optionalProfile.isPresent()) {
final NickoProfile profile = optionalProfile.get();
@ -51,10 +55,6 @@ public class NickoExpansion extends PlaceholderExpansion {
skin = profile.getSkin();
locale = profile.getLocale().getName();
bungeecord = profile.isBungeecordTransfer();
} else {
name = skin = player.getName();
locale = "N/A";
bungeecord = true;
}
return switch (params) {