Skip to content

Commit

Permalink
Improve <p@player.is_banned>
Browse files Browse the repository at this point in the history
  • Loading branch information
Fortifier42 committed Jan 16, 2016
1 parent 0f7471e commit 5386d2e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main/java/net/aufdemrand/denizen/objects/dPlayer.java
Original file line number Diff line number Diff line change
Expand Up @@ -1148,10 +1148,10 @@ else if (attribute.startsWith("uuid") && !isOnline())
// -->
if (attribute.startsWith("is_banned")) {
BanEntry ban = Bukkit.getBanList(BanList.Type.NAME).getBanEntry(getName());
if (ban != null && ban.getExpiration().after(new Date())) {
return Element.TRUE.getAttribute(attribute.fulfill(1));
if (ban == null) {
return Element.FALSE.getAttribute(attribute.fulfill(1));
}
return Element.FALSE.getAttribute(attribute.fulfill(1));
return new Element(ban.getExpiration().after(new Date())).getAttribute(attribute.fulfill(1));
}

// <--[tag]
Expand Down

0 comments on commit 5386d2e

Please sign in to comment.