Fix bugs in the magic skill plugin.

This commit is contained in:
Major-
2014-03-09 09:42:06 +00:00
parent f9d982934c
commit 01a9631f32
7 changed files with 109 additions and 119 deletions
+2 -2
View File
@@ -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