Add the new utils plugin, change entity spawning and the lookup command plugins to use it.

This commit is contained in:
Major-
2014-08-09 06:45:53 +01:00
parent e08a737933
commit 587901c630
8 changed files with 157 additions and 28 deletions
+11
View File
@@ -0,0 +1,11 @@
# Checks whether the amount of arguments provided is correct, sending the player the specified message if not.
def valid_arg_length(args, length, player, message)
valid = length.kind_of?(Range) ? length.include?(args.length) : length == args.length
if (!valid)
player.send_message(message)
return false
end
return true
end