Really fix OfflinePlayer bug.

This commit is contained in:
AppleDash 2016-09-30 21:15:17 -04:00
parent 1f26acb49d
commit 98f8e66c58

View File

@ -19,7 +19,7 @@ public class PlayerUtils {
public static OfflinePlayer getOfflinePlayer(String playerNameOrUUID) {
OfflinePlayer player = tryGetFromUUID(playerNameOrUUID);
if (player != null && player.hasPlayedBefore()) {
if (player != null && (player.hasPlayedBefore() || player.isOnline())) {
return player;
}
@ -29,7 +29,7 @@ public class PlayerUtils {
player = Bukkit.getServer().getOfflinePlayer(playerNameOrUUID);
}
if ((player != null) && !player.hasPlayedBefore()) {
if ((player != null) && (!player.hasPlayedBefore() && !player.isOnline())) {
return null;
}