feat(papi): empty profile check

This commit is contained in:
aro 2023-01-23 18:47:38 +01:00
parent 7484b40cfc
commit 09e30f6a62
2 changed files with 5 additions and 3 deletions

View file

@ -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>

View file

@ -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();
if (!profile.isEmpty()) {
name = profile.getName(); name = profile.getName();
skin = profile.getSkin(); skin = profile.getSkin();
}
locale = profile.getLocale().getName(); locale = profile.getLocale().getName();
bungeecord = profile.isBungeecordTransfer(); bungeecord = profile.isBungeecordTransfer();
} }