mirror of
https://github.com/2006-Scape/apollo.git
synced 2026-07-05 16:49:04 +00:00
Plugin cleanup.
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user