summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornielsbreu@gmail.com <nielsbreu@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-07-05 13:13:21 +0200
committernielsbreu@gmail.com <nielsbreu@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-07-05 13:13:21 +0200
commitcc4a1cad399cc6a2617c1cdf02f9417eec2c4263 (patch)
tree78b0d7a2ac959d48c87c54da79ab3a934037a7c4
parentEmpty buckets replace fluid buckets on use and vice versa (patch contributed by Mgueydan) (diff)
downloadcuberite-cc4a1cad399cc6a2617c1cdf02f9417eec2c4263.tar
cuberite-cc4a1cad399cc6a2617c1cdf02f9417eec2c4263.tar.gz
cuberite-cc4a1cad399cc6a2617c1cdf02f9417eec2c4263.tar.bz2
cuberite-cc4a1cad399cc6a2617c1cdf02f9417eec2c4263.tar.lz
cuberite-cc4a1cad399cc6a2617c1cdf02f9417eec2c4263.tar.xz
cuberite-cc4a1cad399cc6a2617c1cdf02f9417eec2c4263.tar.zst
cuberite-cc4a1cad399cc6a2617c1cdf02f9417eec2c4263.zip
-rw-r--r--MCServer/Plugins/Core/back.lua4
-rw-r--r--MCServer/Plugins/Core/functions.lua4
-rw-r--r--MCServer/Plugins/Core/main.lua4
3 files changed, 4 insertions, 8 deletions
diff --git a/MCServer/Plugins/Core/back.lua b/MCServer/Plugins/Core/back.lua
index ade1c9d64..63ec1d857 100644
--- a/MCServer/Plugins/Core/back.lua
+++ b/MCServer/Plugins/Core/back.lua
@@ -1,8 +1,8 @@
function HandleBackCommand( Split, Player )
- if (X[Player:GetName()] == nil) or (Y[Player:GetName()] == nil) or (Z[Player:GetName()] == nil) then
+ if BackCoords[Player:GetName()] == nil then
Player:SendMessage(cChatColor.Green .. "There is no last position known")
else
- Player:TeleportToCoords(X[Player:GetName()], Y[Player:GetName()], Z[Player:GetName()])
+ Player:TeleportToCoords(BackCoords[Player:GetName()].x, BackCoords[Player:GetName()].y, BackCoords[Player:GetName()].z)
Player:SendMessage(cChatColor.Green .. "You teleported back to your last known position")
end
return true
diff --git a/MCServer/Plugins/Core/functions.lua b/MCServer/Plugins/Core/functions.lua
index 6d82d2253..36fb3786f 100644
--- a/MCServer/Plugins/Core/functions.lua
+++ b/MCServer/Plugins/Core/functions.lua
@@ -1,5 +1,3 @@
function SetBackCoordinates( Player )
- X[Player:GetName()] = Player:GetPosX()
- Y[Player:GetName()] = Player:GetPosY()
- Z[Player:GetName()] = Player:GetPosZ()
+ BackCoords[Player:GetName()] = Vector3i( Player:GetPosX(), Player:GetPosY(), Player:GetPosZ() )
end \ No newline at end of file
diff --git a/MCServer/Plugins/Core/main.lua b/MCServer/Plugins/Core/main.lua
index fa67dc977..acdcd1606 100644
--- a/MCServer/Plugins/Core/main.lua
+++ b/MCServer/Plugins/Core/main.lua
@@ -7,9 +7,7 @@ SHOW_PLUGIN_NAMES = true -- If true, plugin name will be shown before commands
PLUGIN = {} -- Reference to own plugin object
BannedPlayersIni = {}
WhiteListIni = {}
-X = {}
-Y = {}
-Z = {}
+BackCoords = {}
LimitWorldsCuboid = {}