mirror of
https://github.com/songoda/FabledSkyBlock.git
synced 2024-09-03 18:40:35 +02:00
Fix '/is bans' showing invalid players
This commit is contained in:
parent
15667c8635
commit
c89be5cc73
|
@ -8,6 +8,7 @@ import java.util.List;
|
|||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
|
||||
import me.goodandevil.skyblock.utils.player.OfflinePlayer;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.configuration.file.FileConfiguration;
|
||||
|
||||
|
@ -45,7 +46,12 @@ public class Ban {
|
|||
.getConfig(new File(new File(skyblock.getDataFolder().toString() + "/ban-data"),
|
||||
islandOwnerUUID.toString() + ".yml"))
|
||||
.getFileConfiguration().getStringList("Bans")) {
|
||||
islandBans.add(UUID.fromString(islandBanList));
|
||||
|
||||
UUID uuid = UUID.fromString(islandBanList);
|
||||
if (!Bukkit.getOfflinePlayer(uuid).hasPlayedBefore())
|
||||
continue;
|
||||
|
||||
islandBans.add(uuid);
|
||||
}
|
||||
|
||||
return islandBans;
|
||||
|
|
|
@ -216,7 +216,12 @@ public class Bans {
|
|||
targetPlayerTexture = offlinePlayer.getTexture();
|
||||
} else {
|
||||
targetPlayerName = targetPlayer.getName();
|
||||
targetPlayerTexture = playerDataManager.getPlayerData(targetPlayer).getTexture();
|
||||
|
||||
if (playerDataManager.hasPlayerData(targetPlayer)) {
|
||||
targetPlayerTexture = playerDataManager.getPlayerData(targetPlayer).getTexture();
|
||||
} else {
|
||||
targetPlayerTexture = new String[] { null, null };
|
||||
}
|
||||
}
|
||||
|
||||
nInv.addItem(
|
||||
|
|
|
@ -220,7 +220,12 @@ public class Coop {
|
|||
targetPlayerTexture = offlinePlayer.getTexture();
|
||||
} else {
|
||||
targetPlayerName = targetPlayer.getName();
|
||||
targetPlayerTexture = playerDataManager.getPlayerData(targetPlayer).getTexture();
|
||||
|
||||
if (playerDataManager.hasPlayerData(targetPlayer)) {
|
||||
targetPlayerTexture = playerDataManager.getPlayerData(targetPlayer).getTexture();
|
||||
} else {
|
||||
targetPlayerTexture = new String[] { null, null };
|
||||
}
|
||||
}
|
||||
|
||||
nInv.addItem(
|
||||
|
|
Loading…
Reference in New Issue
Block a user