feat(papi): empty profile check
This commit is contained in:
parent
7484b40cfc
commit
09e30f6a62
2 changed files with 5 additions and 3 deletions
|
@ -94,7 +94,7 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.spigotmc</groupId>
|
<groupId>org.spigotmc</groupId>
|
||||||
<artifactId>spigot-api</artifactId>
|
<artifactId>spigot-api</artifactId>
|
||||||
<version>1.19.2-R0.1-SNAPSHOT</version>
|
<version>1.19.3-R0.1-SNAPSHOT</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
|
|
|
@ -51,8 +51,10 @@ 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();
|
||||||
name = profile.getName();
|
if (!profile.isEmpty()) {
|
||||||
skin = profile.getSkin();
|
name = profile.getName();
|
||||||
|
skin = profile.getSkin();
|
||||||
|
}
|
||||||
locale = profile.getLocale().getName();
|
locale = profile.getLocale().getName();
|
||||||
bungeecord = profile.isBungeecordTransfer();
|
bungeecord = profile.isBungeecordTransfer();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue