forked from cuberite/Core
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathseed.lua
More file actions
30 lines (25 loc) · 698 Bytes
/
seed.lua
File metadata and controls
30 lines (25 loc) · 698 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
function HandleSeedCommand( Split, Player )
if not(Split[2]) then
Player:SendMessageInfo("Seed: " .. Player:GetWorld():GetSeed())
else
local World = cRoot:Get():GetWorld(Split[2])
if not(World) then
Player:SendMessageInfo("There is no world \"" .. Split[2] .. "\"")
else
Player:SendMessageInfo("Seed: " .. World:GetSeed())
end
end
return true
end
function HandleConsoleSeed( Split )
if not(Split[2]) then
return true, "Seed: " .. cRoot:Get():GetDefaultWorld():GetSeed()
else
local World = cRoot:Get():GetWorld(Split[2])
if not(World) then
return true, "There is no world \"" .. Split[2] .. "\""
else
return true, "Seed: " .. World:GetSeed()
end
end
end