summaryrefslogtreecommitdiff
path: root/signalstrength.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 /signalstrength.py
parent93ca9e045628ccc1d76a6ae8b3648126451f6a24 (diff)
Fix survival use of /signalstrength, other interesting changes
Diffstat (limited to 'signalstrength.py')
-rw-r--r--signalstrength.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/signalstrength.py b/signalstrength.py
index ebe2bd1..c668b46 100644
--- a/signalstrength.py
+++ b/signalstrength.py
@@ -109,6 +109,11 @@ def get_entire_container(container):
helpSubcmd = True,
senderLimit = 0)
def on_signalstrength_command(sender, command, label, args):
+
+ #Sender has to be in creative and if in Trusted world, they have to be Trusted+. Any ranks above trusted inherit groups.trusted.
+ if (not is_creative(sender)) or (sender.getWorld().getName() == "Trusted" and not is_rank(sender, "trusted")):
+ return "&cYou do not have permission to use that command in this world"
+
if len(args) > 0 and args[0].lower() in ("default", "defaults", "setdefaults"):
strength, item_type, item_data = get_data(sender, args[1:])