feat(event): add warning on load failure
This commit is contained in:
parent
ff22f5addf
commit
52edd9fa65
1 changed files with 3 additions and 1 deletions
|
@ -37,7 +37,7 @@ public class PlayerJoinListener implements Listener {
|
|||
nameStore.storeName(player);
|
||||
|
||||
final Optional<NickoProfile> optionalProfile = dataStore.getData(player.getUniqueId());
|
||||
optionalProfile.ifPresent(profile -> {
|
||||
optionalProfile.ifPresentOrElse(profile -> {
|
||||
// Random Skin on connection feature
|
||||
if (profile.isRandomSkin()) {
|
||||
final String name = instance.getNameFetcher().getRandomUsername();
|
||||
|
@ -61,6 +61,8 @@ public class PlayerJoinListener implements Listener {
|
|||
));
|
||||
}
|
||||
}
|
||||
}, () -> {
|
||||
instance.getLogger().warning("Failed to load data for " + player.getName());
|
||||
});
|
||||
|
||||
for (Player online : Bukkit.getOnlinePlayers().stream().filter(op -> op.getUniqueId() != player.getUniqueId()).toList()) {
|
||||
|
|
Loading…
Reference in a new issue