summaryrefslogtreecommitdiffstats
path: root/cwd
diff options
context:
space:
mode:
authorLaG1924 <lag1924@gmail.com>2021-07-05 15:36:28 +0200
committerLaG1924 <lag1924@gmail.com>2021-07-05 15:36:28 +0200
commit28cda3a34c85a35be2e1e4fa35b10fae5d0956d7 (patch)
tree4e2fa2a75f76778b1982a84c5a17d8d8744dd078 /cwd
parentFixed shader error on MacOS (diff)
downloadAltCraft-28cda3a34c85a35be2e1e4fa35b10fae5d0956d7.tar
AltCraft-28cda3a34c85a35be2e1e4fa35b10fae5d0956d7.tar.gz
AltCraft-28cda3a34c85a35be2e1e4fa35b10fae5d0956d7.tar.bz2
AltCraft-28cda3a34c85a35be2e1e4fa35b10fae5d0956d7.tar.lz
AltCraft-28cda3a34c85a35be2e1e4fa35b10fae5d0956d7.tar.xz
AltCraft-28cda3a34c85a35be2e1e4fa35b10fae5d0956d7.tar.zst
AltCraft-28cda3a34c85a35be2e1e4fa35b10fae5d0956d7.zip
Diffstat (limited to 'cwd')
-rw-r--r--cwd/assets/altcraft/scripts/init.lua11
1 files changed, 11 insertions, 0 deletions
diff --git a/cwd/assets/altcraft/scripts/init.lua b/cwd/assets/altcraft/scripts/init.lua
index b60a988..c938e94 100644
--- a/cwd/assets/altcraft/scripts/init.lua
+++ b/cwd/assets/altcraft/scripts/init.lua
@@ -7,6 +7,7 @@ local plugin = {
onTick = nil,
onRequestBlockInfo = nil,
onChatMessage = nil,
+ onDisconnected = nil,
}
function plugin.onLoad ()
@@ -104,6 +105,16 @@ function plugin.onChatMessage(chat, pos)
MoveChatToBottom = true
end
+function plugin.onDisconnected(reason)
+ local mmDoc = {}
+ for i,d in ipairs(rmlui.contexts["default"].documents) do
+ if d.title == "MainMenu" then
+ mmDoc = d
+ end
+ end
+ mmDoc:GetElementById('disclaimer').inner_rml = reason
+end
+
AC.RegisterDimension(0, Dimension.new("overworld", true))
AC.RegisterDimension(-1, Dimension.new("the_nether", false))
AC.RegisterDimension(1, Dimension.new("the_end", false))