summaryrefslogtreecommitdiff
path: root/helpers.py
diff options
context:
space:
mode:
authorDico200 <dico.karssiens@gmail.com>2015-11-03 19:05:15 +0100
committerDico200 <dico.karssiens@gmail.com>2015-11-03 19:05:15 +0100
commitaa86881f5eabe0a7471aadf73ee8a7b789e679dc (patch)
tree9903910fa5cbbc21078228538a9fb61386ddcafb /helpers.py
parent93ca9e045628ccc1d76a6ae8b3648126451f6a24 (diff)
Fix survival use of /signalstrength, other interesting changes
Diffstat (limited to 'helpers.py')
-rw-r--r--helpers.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/helpers.py b/helpers.py
index 898dea7..79af3a0 100644
--- a/helpers.py
+++ b/helpers.py
@@ -181,6 +181,16 @@ def is_creative(player):
return str(player.getGameMode()) == "CREATIVE"
+def is_rank(player, rank):
+ """
+ rank: a string equal to the PEX group name found in /pex groups
+ returns True if one of the following conditions are met:
+ - the player is of the given rank,
+ - their rank inherits the given rank.
+ """
+ return player.hasPermission("groups." + rank)
+
+
def uid(player):
"""
returns the player's UUID