Update all plugins to conform to Rubocop.

This commit is contained in:
Major-
2015-08-27 18:17:58 +01:00
parent 424d2bda29
commit 8f3fd75b33
75 changed files with 1625 additions and 1537 deletions
+8 -6
View File
@@ -6,10 +6,11 @@ java_import 'org.apollo.cache.def.ItemDefinition'
on :command, :item, RIGHTS_ADMIN do |player, command|
args = command.arguments
next unless valid_arg_length(args, (1..2), player, 'Invalid syntax - ::item [id] [amount]')
id = args[0].to_i
amount = args.length == 2 ? args[1].to_i : 1
if (id < 0 || id >= ItemDefinition.count)
if id < 0 || id >= ItemDefinition.count
player.send_message('The item id you specified is out of bounds!')
next
end
@@ -24,7 +25,8 @@ on :command, :remove, RIGHTS_MOD do |player, command|
id = args[0].to_i
amount = args.length == 2 ? args[1].to_i : 1
if (id < 0 || id >= ItemDefinition.count)
if id < 0 || id >= ItemDefinition.count
player.send_message('The item id you specified is out of bounds!')
next
end
@@ -33,11 +35,11 @@ on :command, :remove, RIGHTS_MOD do |player, command|
end
# Clears the player's inventory.
on :command, :empty, RIGHTS_MOD do |player, command|
on :command, :empty, RIGHTS_MOD do |player, _command|
player.inventory.clear
end
# Gives the player 1,000 of each rune.
on :command, :runes, RIGHTS_ADMIN do |player, command|
on :command, :runes, RIGHTS_ADMIN do |player, _command|
(554..566).each { |item| player.inventory.add(item, 1000) }
end
end