summaryrefslogblamecommitdiffstats
path: root/MCServer/Plugins/Core/top.lua
blob: 0f7a8f95f25e903b07c0365122b4500e02bc7d52 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11










                                                                                           
function HandleTopCommand( Split, Player )
	local World = Player:GetWorld()
	
	local PlayerPos = Player:GetPosition()
	local Height = World:GetHeight( math.floor(PlayerPos.x), math.floor(PlayerPos.z) )
	
	Player:TeleportTo( PlayerPos.x, Height+1, PlayerPos.z )
	Player:SendMessage("Teleported to the top block")
	
	return true
end