summaryrefslogtreecommitdiffstats
path: root/MCServer/Plugins/Core/back.lua
blob: 201e0bb428e1de894b0ce53dc7ccff7eea891501 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
function HandleBackCommand( Split, Player )
	if BackCoords[Player:GetName()] == nil then
		SendMessageFailure(Player, "No known last position")
		return true
	else
		Player:TeleportToCoords(BackCoords[Player:GetName()].x, BackCoords[Player:GetName()].y, BackCoords[Player:GetName()].z)
		SendMessageSuccess(Player, "Teleported back to your last known position")
	end
	return true
end