FIx invalid player textures for visit/leaderboard causing errors

This commit is contained in:
Esophose 2019-08-17 11:31:16 -06:00
parent c07aacf676
commit af583ed710
2 changed files with 10 additions and 8 deletions

View File

@ -248,10 +248,11 @@ public class Leaderboard {
} else {
playerName = targetPlayer.getName();
if (!playerDataManager.hasPlayerData(targetPlayer))
playerDataManager.createPlayerData(targetPlayer);
playerTexture = playerDataManager.getPlayerData(targetPlayer).getTexture();
if (playerDataManager.hasPlayerData(targetPlayer)) {
playerTexture = playerDataManager.getPlayerData(targetPlayer).getTexture();
} else {
playerTexture = new String[] { null, null };
}
}
if (leaderboard.getPosition() == 0) {

View File

@ -404,10 +404,11 @@ public class Visit {
} else {
targetPlayerName = targetPlayer.getName();
if (!playerDataManager.hasPlayerData(targetPlayer))
playerDataManager.createPlayerData(targetPlayer);
targetPlayerTexture = playerDataManager.getPlayerData(targetPlayer).getTexture();
if (playerDataManager.hasPlayerData(targetPlayer)) {
targetPlayerTexture = playerDataManager.getPlayerData(targetPlayer).getTexture();
} else {
targetPlayerTexture = new String[] { null, null };
}
}
Island island = null;