Plugin cleanup.

This commit is contained in:
Major-
2013-11-07 22:59:55 +00:00
parent 003aa082a2
commit 751b0ead4b
6 changed files with 25 additions and 50 deletions
+3 -3
View File
@@ -2,19 +2,19 @@ require 'java'
java_import 'org.apollo.game.model.Position'
on :command, :pos, RIGHTS_MOD do |player, command|
player.send_message "You are at: " + player.position.to_s
player.send_message("You are at: #{player.position}")
end
on :command, :tele, RIGHTS_ADMIN do |player, command|
args = command.arguments
unless (2..3).include? args.length
player.send_message "Invalid syntax - ::tele [x] [y] [optional-z]"
player.send_message("Invalid syntax - ::tele [x] [y] [optional-z]")
return
end
x = args[0].to_i
y = args[1].to_i
z = args.length == 3 ? args[2].to_i : 0
z = args.length == 3 ? args[2].to_i : player.position.height
player.teleport Position.new(x, y, z)
end