diff options
Diffstat (limited to 'clientmods/preview')
-rw-r--r-- | clientmods/preview/init.lua | 28 |
1 files changed, 13 insertions, 15 deletions
diff --git a/clientmods/preview/init.lua b/clientmods/preview/init.lua index a384fd6bf..223577876 100644 --- a/clientmods/preview/init.lua +++ b/clientmods/preview/init.lua @@ -7,21 +7,19 @@ dofile("preview:example.lua") core.register_on_shutdown(function() print("[PREVIEW] shutdown client") end) -local id = 0 -core.register_on_connect(function() - print("[PREVIEW] Player connection completed") - local server_info = core.get_server_info() - print("Server version: " .. server_info.protocol_version) - print("Server ip: " .. server_info.ip) - print("Server address: " .. server_info.address) - print("Server port: " .. server_info.port) - mod_channel = core.mod_channel_join("experimental_preview") - - core.after(4, function() - if mod_channel:is_writeable() then - mod_channel:send_all("preview talk to experimental") - end - end) +local id = nil + +local server_info = core.get_server_info() +print("Server version: " .. server_info.protocol_version) +print("Server ip: " .. server_info.ip) +print("Server address: " .. server_info.address) +print("Server port: " .. server_info.port) +mod_channel = core.mod_channel_join("experimental_preview") + +core.after(4, function() + if mod_channel:is_writeable() then + mod_channel:send_all("preview talk to experimental") + end end) core.after(1, function() |