summaryrefslogtreecommitdiffstats
path: root/Plugins
diff options
context:
space:
mode:
authorfaketruth <faketruth@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-01-26 21:39:46 +0100
committerfaketruth <faketruth@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-01-26 21:39:46 +0100
commit4e34e438f12abb31f2409ce9d50df8acc2128555 (patch)
tree68d180344b0f730779c18c927fafc07de5ee5b2b /Plugins
parentProbably fixed a deadlock! http://www.mc-server.org/support/index.php?do=details&task_id=147 (diff)
downloadcuberite-4e34e438f12abb31f2409ce9d50df8acc2128555.tar
cuberite-4e34e438f12abb31f2409ce9d50df8acc2128555.tar.gz
cuberite-4e34e438f12abb31f2409ce9d50df8acc2128555.tar.bz2
cuberite-4e34e438f12abb31f2409ce9d50df8acc2128555.tar.lz
cuberite-4e34e438f12abb31f2409ce9d50df8acc2128555.tar.xz
cuberite-4e34e438f12abb31f2409ce9d50df8acc2128555.tar.zst
cuberite-4e34e438f12abb31f2409ce9d50df8acc2128555.zip
Diffstat (limited to 'Plugins')
-rw-r--r--Plugins/NewTest/main.lua17
-rw-r--r--Plugins/NewTest/tick.lua5
2 files changed, 22 insertions, 0 deletions
diff --git a/Plugins/NewTest/main.lua b/Plugins/NewTest/main.lua
new file mode 100644
index 000000000..cd8df03e5
--- /dev/null
+++ b/Plugins/NewTest/main.lua
@@ -0,0 +1,17 @@
+LOGINFO("main.lua!!")
+LOOLOL = "12345"
+PLUGIN = {}
+
+function Initialize( Plugin )
+ LOGINFO("Initialize in main.lua")
+ PLUGIN = Plugin
+
+ Plugin:SetName("LOLOL new plugin!")
+
+ PluginManager = cRoot:Get():GetPluginManager()
+ PluginManager:AddHook( Plugin, cPluginManager.E_PLUGIN_TICK )
+
+ LOGINFO("Plugin name is: " .. Plugin:GetName() )
+
+ return true
+end \ No newline at end of file
diff --git a/Plugins/NewTest/tick.lua b/Plugins/NewTest/tick.lua
new file mode 100644
index 000000000..69de13c65
--- /dev/null
+++ b/Plugins/NewTest/tick.lua
@@ -0,0 +1,5 @@
+LOGINFO("tick.lua!! ")
+
+function Tick( DeltaTime )
+ LOGINFO("Tick in tick.lua; LOOLOL = " .. LOOLOL .. " Plugin name = " .. PLUGIN:GetName() )
+end \ No newline at end of file