feat: papi expension

This commit is contained in:
ineanto 2024-11-26 09:03:46 +01:00
parent 7ba8a26af6
commit ff892a7451
Signed by: ineanto
GPG key ID: E511F9CAA2F9CE84

View file

@ -29,7 +29,7 @@ public class NickoExpansion extends PlaceholderExpansion {
@Override @Override
public @NotNull String getVersion() { public @NotNull String getVersion() {
return "1.0.0"; return "1.0.1";
} }
@Override @Override
@ -51,15 +51,8 @@ public class NickoExpansion extends PlaceholderExpansion {
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();
if (profile.hasData()) { name = profile.getName() == null ? player.getName() : profile.getName();
if (profile.getName() != null) { skin = profile.getSkin() == null ? player.getName() : profile.getSkin();
name = profile.getName();
}
if (profile.getSkin() != null) {
skin = profile.getSkin();
}
}
locale = profile.getLocale().getName(); locale = profile.getLocale().getName();
randomSkin = profile.isRandomSkin(); randomSkin = profile.isRandomSkin();
} }