refactor: else branch not necessary
This commit is contained in:
parent
ffb50e8391
commit
d9dca0c0cc
1 changed files with 4 additions and 4 deletions
|
@ -44,6 +44,10 @@ public class NickoExpansion extends PlaceholderExpansion {
|
||||||
String name, skin, locale;
|
String name, skin, locale;
|
||||||
boolean bungeecord;
|
boolean bungeecord;
|
||||||
|
|
||||||
|
name = skin = player.getName();
|
||||||
|
locale = "N/A";
|
||||||
|
bungeecord = true;
|
||||||
|
|
||||||
final Optional<NickoProfile> optionalProfile = instance.getDataStore().getData(player.getUniqueId());
|
final Optional<NickoProfile> optionalProfile = instance.getDataStore().getData(player.getUniqueId());
|
||||||
if (optionalProfile.isPresent()) {
|
if (optionalProfile.isPresent()) {
|
||||||
final NickoProfile profile = optionalProfile.get();
|
final NickoProfile profile = optionalProfile.get();
|
||||||
|
@ -51,10 +55,6 @@ public class NickoExpansion extends PlaceholderExpansion {
|
||||||
skin = profile.getSkin();
|
skin = profile.getSkin();
|
||||||
locale = profile.getLocale().getName();
|
locale = profile.getLocale().getName();
|
||||||
bungeecord = profile.isBungeecordTransfer();
|
bungeecord = profile.isBungeecordTransfer();
|
||||||
} else {
|
|
||||||
name = skin = player.getName();
|
|
||||||
locale = "N/A";
|
|
||||||
bungeecord = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return switch (params) {
|
return switch (params) {
|
||||||
|
|
Loading…
Reference in a new issue