Fix survival use of /signalstrength, other interesting changes

This commit is contained in:
Dico200
2015-11-03 19:05:15 +01:00
parent 93ca9e0456
commit aa86881f5e
4 changed files with 84 additions and 14 deletions

View File

@@ -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