diff options
Diffstat (limited to 'MCServer')
-rw-r--r-- | MCServer/Plugins/Core/back.lua | 4 | ||||
-rw-r--r-- | MCServer/Plugins/Core/functions.lua | 4 | ||||
-rw-r--r-- | MCServer/Plugins/Core/main.lua | 4 |
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 = {}
|