/is visit and /is top playerdata fixes

This commit is contained in:
Esophose 2019-08-15 01:38:38 -06:00
parent aae24ab1a0
commit 344911bfca
3 changed files with 11 additions and 0 deletions

View File

@ -20,6 +20,9 @@ public class VisitCommand extends SubCommand {
SoundManager soundManager = skyblock.getSoundManager();
if (args.length == 0) {
if (!skyblock.getPlayerDataManager().hasPlayerData(player))
skyblock.getPlayerDataManager().createPlayerData(player);
PlayerData playerData = skyblock.getPlayerDataManager().getPlayerData(player);
playerData.setType(Visit.Type.Default);
playerData.setSort(Visit.Sort.Default);

View File

@ -247,6 +247,10 @@ public class Leaderboard {
playerTexture = offlinePlayer.getTexture();
} else {
playerName = targetPlayer.getName();
if (!playerDataManager.hasPlayerData(targetPlayer))
playerDataManager.createPlayerData(targetPlayer);
playerTexture = playerDataManager.getPlayerData(targetPlayer).getTexture();
}

View File

@ -403,6 +403,10 @@ public class Visit {
targetPlayerTexture = offlinePlayer.getTexture();
} else {
targetPlayerName = targetPlayer.getName();
if (!playerDataManager.hasPlayerData(targetPlayer))
playerDataManager.createPlayerData(targetPlayer);
targetPlayerTexture = playerDataManager.getPlayerData(targetPlayer).getTexture();
}