Skip to content
This repository has been archived by the owner on Apr 12, 2022. It is now read-only.

Commit

Permalink
has_permission tag
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed Jun 10, 2018
1 parent 8008dfc commit 147610e
Showing 1 changed file with 11 additions and 0 deletions.
Expand Up @@ -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
Expand Down

0 comments on commit 147610e

Please sign in to comment.