Skip to content
Permalink
Browse files

has_permission tag

  • Loading branch information...
mcmonkey4eva committed Jun 10, 2018
1 parent 8008dfc commit 147610e390e7cea421628e6fdd0dfdaf4c7e647e
Showing with 11 additions and 0 deletions.
  1. +11 −0 src/main/java/com/denizenscript/denizen2sponge/tags/objects/PlayerTag.java
@@ -137,6 +137,17 @@ public User getInternal() {
return new TextTag(pl.gameMode().get().toString());
});
// <--[tag]
// @Since 0.5.0
// @Name PlayerTag.has_permission[<TextTag>]
// @Updated 2018/06/09
// @Group Properties
// @ReturnType BooleanTag
// @Returns whether the player has a specific permission node.
// -->
handlers.put("has_permission", (dat, obj) -> {
return BooleanTag.getForBoolean(((PlayerTag) obj).internal.hasPermission(dat.getNextModifier().toString()));
});
// <--[tag]
// @Since 0.4.0
// @Name PlayerTag.has_advancement[<TextTag>]
// @Updated 2018/02/07

0 comments on commit 147610e

Please sign in to comment.
You can’t perform that action at this time.