Skip to content

Commit

Permalink
Added <server.has_whitelist> to see if the server is whitelisted
Browse files Browse the repository at this point in the history
  • Loading branch information
Fortifier42 committed Oct 9, 2015
1 parent 41af2ba commit 2df21f3
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/main/java/net/aufdemrand/denizen/tags/core/ServerTags.java
Expand Up @@ -117,6 +117,17 @@ public void serverTag(ReplaceableTagEvent event) {
return;
}

// <--[tag]
// @attribute <server.has_whitelist>
// @returns Element(boolean)
// @description
// returns true if the server's whitelist is active, otherwise returns false.
// -->
if (attribute.startsWith("has_whitelist")) {
event.setReplaced(new Element(Bukkit.hasWhitelist()).getAttribute(attribute.fulfill(1)));
return;
}

// <--[tag]
// @attribute <server.has_flag[<flag_name>]>
// @returns Element(boolean)
Expand Down

0 comments on commit 2df21f3

Please sign in to comment.