Migrate to UUID usage

This commit is contained in:
ShadowRanger
2015-06-22 18:30:27 +10:00
parent e8476d5b05
commit d988becf1f
4 changed files with 28 additions and 20 deletions

View File

@@ -34,7 +34,7 @@ public class PlayerDataManager {
public Player loadPlayer(UUID uuid) {
try {
OfflinePlayer player = Bukkit.getOfflinePlayer(uuid);
if (player == null) {
if (player == null || !player.hasPlayedBefore()) {
return null;
}
GameProfile profile = new GameProfile(uuid, player.getName());

View File

@@ -32,7 +32,7 @@ public class SpecialPlayerInventory extends PlayerInventory {
private CraftPlayer owner;
private boolean playerOnline = false;
public SpecialPlayerInventory(Player p, Boolean online) {
public SpecialPlayerInventory(Player p, boolean online) {
super(((CraftPlayer) p).getHandle());
this.owner = (CraftPlayer) p;
this.items = player.inventory.items;