summaryrefslogtreecommitdiffstats
path: root/MCServer/Plugins/Core/teleport.lua
diff options
context:
space:
mode:
authorAlexander Harkness <bearbin@gmail.com>2013-08-13 18:55:46 +0200
committerAlexander Harkness <bearbin@gmail.com>2013-08-13 18:55:46 +0200
commitc52e0e81ea1584e37359ff9e77b00c3e35045ced (patch)
treeb784106b72e245fba95350262d1a394c031a84df /MCServer/Plugins/Core/teleport.lua
parentMerge pull request #84 from tonibm19/patch-2 (diff)
downloadcuberite-c52e0e81ea1584e37359ff9e77b00c3e35045ced.tar
cuberite-c52e0e81ea1584e37359ff9e77b00c3e35045ced.tar.gz
cuberite-c52e0e81ea1584e37359ff9e77b00c3e35045ced.tar.bz2
cuberite-c52e0e81ea1584e37359ff9e77b00c3e35045ced.tar.lz
cuberite-c52e0e81ea1584e37359ff9e77b00c3e35045ced.tar.xz
cuberite-c52e0e81ea1584e37359ff9e77b00c3e35045ced.tar.zst
cuberite-c52e0e81ea1584e37359ff9e77b00c3e35045ced.zip
Diffstat (limited to '')
-rw-r--r--MCServer/Plugins/Core/teleport.lua26
1 files changed, 0 insertions, 26 deletions
diff --git a/MCServer/Plugins/Core/teleport.lua b/MCServer/Plugins/Core/teleport.lua
index 70aee131c..126801648 100644
--- a/MCServer/Plugins/Core/teleport.lua
+++ b/MCServer/Plugins/Core/teleport.lua
@@ -72,29 +72,3 @@ function HandleTPAcceptCommand( Split, Player )
return true
end
-
--- Teleports a_SrcPlayer to a player named a_DstPlayerName; if a_TellDst is true, will send a notice to the destination player
-function TeleportToPlayer( a_SrcPlayer, a_DstPlayerName, a_TellDst )
-
- local teleport = function(OtherPlayer)
-
- if OtherPlayer == a_SrcPlayer then
- -- Asked to teleport to self?
- SendMessageFailure( a_SrcPlayer, "Y' can't teleport to yerself!" )
- else
- SetBackCoordinates( a_SrcPlayer )
- a_SrcPlayer:TeleportToEntity( OtherPlayer )
- SendMessageSuccess( a_SrcPlayer, "You teleported to " .. OtherPlayer:GetName() .. "!" )
- if (a_TellDst) then
- SendMessage( OtherPlayer, Player:GetName().." teleported to you!" )
- end
- end
-
- end
-
- local World = a_SrcPlayer:GetWorld()
- if not World:DoWithPlayer(a_DstPlayerName, teleport) then
- SendMessageFailure( a_SrcPlayer, "Can't find player " .. a_DstPlayerName)
- end
-
-end