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.
This commit is contained in:
Dico200
2015-05-18 23:05:54 +02:00
parent 057b404b03
commit bd05374db0
2 changed files with 266 additions and 97 deletions

View File

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