mirror of
https://github.com/2006-Scape/apollo.git
synced 2026-07-05 16:49:04 +00:00
Fix bugs in the magic skill plugin.
This commit is contained in:
@@ -7,7 +7,7 @@ end
|
||||
|
||||
on :command, :tele, RIGHTS_ADMIN do |player, command|
|
||||
args = command.arguments
|
||||
unless (2..3).include? args.length
|
||||
unless (2..3).include?(args.length)
|
||||
player.send_message("Invalid syntax - ::tele [x] [y] [optional-z]")
|
||||
return
|
||||
end
|
||||
@@ -16,5 +16,5 @@ on :command, :tele, RIGHTS_ADMIN do |player, command|
|
||||
y = args[1].to_i
|
||||
z = args.length == 3 ? args[2].to_i : player.position.height
|
||||
|
||||
player.teleport Position.new(x, y, z)
|
||||
player.teleport Position.new(x, y, z) if (0..4).include?(z)
|
||||
end
|
||||
Reference in New Issue
Block a user