Skip to content

Commit

Permalink
Handle invalid UUID-looking-things properly
Browse files Browse the repository at this point in the history
that's not a valid dPlayer, silly
  • Loading branch information
mcmonkey4eva committed Dec 12, 2014
1 parent 6338c48 commit 65d015a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/net/aufdemrand/denizen/objects/dPlayer.java
Expand Up @@ -104,7 +104,7 @@ static dPlayer valueOfInternal(String string, boolean announce) {
UUID uuid = UUID.fromString(string);
if (uuid != null) {
OfflinePlayer player = Bukkit.getOfflinePlayer(uuid);
if (player != null) {
if (player != null && player.hasPlayedBefore()) {
return new dPlayer(player);
}
}
Expand Down Expand Up @@ -141,7 +141,7 @@ public static boolean matches(String arg) {
UUID uuid = UUID.fromString(arg);
if (uuid != null) {
OfflinePlayer player = Bukkit.getOfflinePlayer(uuid);
if (player != null) {
if (player != null && player.hasPlayedBefore()) {
return true;
}
}
Expand Down

0 comments on commit 65d015a

Please sign in to comment.