diff options
author | Dico200 <dico.karssiens@gmail.com> | 2015-05-18 23:05:54 +0200 |
---|---|---|
committer | Dico200 <dico.karssiens@gmail.com> | 2015-05-18 23:05:54 +0200 |
commit | bd05374db0235afede64f9f3617142726c3117d3 (patch) | |
tree | ef5463c22bb77feb0150eebaa4a0f23fe025a1ab /basecommands.py | |
parent | 057b404b03d2998daf2b970766efebefbd6a5fa8 (diff) |
blockplacemods update, basecommands fix
Added settings: piston, dropper, hopper
changes to the framework
made it so you can set the default contents for all slots in
furnaces/droppers as well as furnaces.
Diffstat (limited to 'basecommands.py')
-rw-r--r-- | basecommands.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/basecommands.py b/basecommands.py index 9517485..d2cb3ab 100644 --- a/basecommands.py +++ b/basecommands.py @@ -79,8 +79,8 @@ class CommandException(Exception): class Validate(): @staticmethod def notNone(obj, msg): - if obj == null: - raise Exception(msg) + if obj == None: + raise CommandException(msg) @staticmethod def isPlayer(sender): @@ -93,9 +93,9 @@ class Validate(): raise CommandException("&cThat command can only be run from the console") @staticmethod - def isAuthorized(sender, permission): + def isAuthorized(sender, permission, msg = "that command"): if not sender.hasPermission(permission): - raise CommandException("&cYou do not have permission to use that command") + raise CommandException("&cYou do not have permission to use " + msg) @staticmethod def isTrue(obj, msg): |