summaryrefslogtreecommitdiffstats
path: root/cwd/assets/altcraft/scripts
diff options
context:
space:
mode:
authorLaG1924 <12997935+LaG1924@users.noreply.github.com>2019-02-17 17:24:52 +0100
committerLaG1924 <12997935+LaG1924@users.noreply.github.com>2019-04-21 12:55:48 +0200
commita2fd708de4ede7427589125e680f3fb339926f4e (patch)
tree75faed7c12a7898e435cf9f40e1ca3af85ca06ec /cwd/assets/altcraft/scripts
parentMinor lua-api improvement (diff)
downloadAltCraft-a2fd708de4ede7427589125e680f3fb339926f4e.tar
AltCraft-a2fd708de4ede7427589125e680f3fb339926f4e.tar.gz
AltCraft-a2fd708de4ede7427589125e680f3fb339926f4e.tar.bz2
AltCraft-a2fd708de4ede7427589125e680f3fb339926f4e.tar.lz
AltCraft-a2fd708de4ede7427589125e680f3fb339926f4e.tar.xz
AltCraft-a2fd708de4ede7427589125e680f3fb339926f4e.tar.zst
AltCraft-a2fd708de4ede7427589125e680f3fb339926f4e.zip
Diffstat (limited to 'cwd/assets/altcraft/scripts')
-rw-r--r--cwd/assets/altcraft/scripts/init.lua13
1 files changed, 9 insertions, 4 deletions
diff --git a/cwd/assets/altcraft/scripts/init.lua b/cwd/assets/altcraft/scripts/init.lua
index d48ecd0..5fd9e11 100644
--- a/cwd/assets/altcraft/scripts/init.lua
+++ b/cwd/assets/altcraft/scripts/init.lua
@@ -1,12 +1,17 @@
-plug = {
+local plugin = {
name = 'altcraft',
displayName = "AltCraft Core Plugin",
onLoad = nil,
onUnload = nil,
+ onChangeState = nil,
}
-function plug:onLoad ()
- print("Loaded "..self.name.."-plugin!")
+function plugin.onLoad ()
+ print("Loaded AltCraft plugin!")
end
-AC:RegisterPlugin(plug) \ No newline at end of file
+function plugin.onChangeState (newState)
+ AC:LogWarning("New state: "..newState)
+end
+
+AC:RegisterPlugin(plugin) \ No newline at end of file