Skip to content

Commit

Permalink
replaced debug.runCommand on debug.setPosition
Browse files Browse the repository at this point in the history
  • Loading branch information
astral17 committed Dec 4, 2016
1 parent 3efdc42 commit d2482fc
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/game/teleport.lua
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ for _, side in pairs(sides) do
points[side] = config.get("teleport", {}, true).get(side, {0, 0, 0})
end


EventEngine:subscribe("teleport", events.priority.low, function(handler, evt)
debug.runCommand(("tp %s %d %d %d"):format(evt.nick,
table.unpack(points[evt.point])))
local pl=debug.getPlayer(evt.nick)
pl.setPosition(points[evt.point].x,points[evt.point].y,points[evt.point].z)
end)

0 comments on commit d2482fc

Please sign in to comment.