Update existing plugins to use the new utils plugin.

This commit is contained in:
Major-
2014-08-09 17:12:25 +01:00
parent 17975206cb
commit c162705cd4
16 changed files with 79 additions and 98 deletions
+2 -8
View File
@@ -6,10 +6,7 @@ java_import 'org.apollo.game.model.Graphic'
# Makes the player perform the animation with the specified id.
on :command, :animate, RIGHTS_MOD do |player, command|
args = command.arguments
unless args.length == 1
player.send_message('Invalid syntax - ::animate [animation-id]')
return
end
next unless valid_arg_length(args, 1, player, 'Invalid syntax - ::animate [animation-id]')
player.play_animation(Animation.new(args[0].to_i))
end
@@ -17,10 +14,7 @@ end
# Makes the player perform the graphic with the specified id.
on :command, :graphic, RIGHTS_MOD do |player, command|
args = command.arguments
unless args.length == 1
player.send_message('Invalid syntax - ::graphic [graphic-id]')
return
end
next unless valid_arg_length(args, 1, player, 'Invalid syntax - ::graphic [graphic-id]')
player.play_graphic(Graphic.new(args[0].to_i))
end