diff options
author | madmaxoft <github@xoft.cz> | 2014-01-05 15:46:45 +0100 |
---|---|---|
committer | madmaxoft <github@xoft.cz> | 2014-01-05 15:46:45 +0100 |
commit | 84bf32f857f890ce50c82a2612fe1bfe072886c9 (patch) | |
tree | 68438c416ed73fd80a7f2f91e1b005edc50bd931 /MCServer/Plugins/APIDump/Writing-a-MCServer-plugin.html | |
parent | Fixed a race condition in the cQueue class. (diff) | |
download | cuberite-84bf32f857f890ce50c82a2612fe1bfe072886c9.tar cuberite-84bf32f857f890ce50c82a2612fe1bfe072886c9.tar.gz cuberite-84bf32f857f890ce50c82a2612fe1bfe072886c9.tar.bz2 cuberite-84bf32f857f890ce50c82a2612fe1bfe072886c9.tar.lz cuberite-84bf32f857f890ce50c82a2612fe1bfe072886c9.tar.xz cuberite-84bf32f857f890ce50c82a2612fe1bfe072886c9.tar.zst cuberite-84bf32f857f890ce50c82a2612fe1bfe072886c9.zip |
Diffstat (limited to '')
-rw-r--r-- | MCServer/Plugins/APIDump/Writing-a-MCServer-plugin.html | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/MCServer/Plugins/APIDump/Writing-a-MCServer-plugin.html b/MCServer/Plugins/APIDump/Writing-a-MCServer-plugin.html index 50e39d533..0e07cebdf 100644 --- a/MCServer/Plugins/APIDump/Writing-a-MCServer-plugin.html +++ b/MCServer/Plugins/APIDump/Writing-a-MCServer-plugin.html @@ -84,7 +84,7 @@ end To register a hook, insert the following code template into the "-- Hooks" area in the previous code example. </p> <pre class="prettyprint lang-lua"> -cPluginManager.AddHook(cPluginManager.HOOK_NAME_HERE, FunctionNameToBeCalled) +cPluginManager:AddHook(cPluginManager.HOOK_NAME_HERE, FunctionNameToBeCalled) </pre> <p> What does this code do? @@ -102,7 +102,7 @@ function Initialize(Plugin) Plugin:SetName("DerpyPlugin") Plugin:SetVersion(1) - cPluginManager.AddHook(cPluginManager.HOOK_PLAYER_MOVING, OnPlayerMoving) + cPluginManager:AddHook(cPluginManager.HOOK_PLAYER_MOVING, OnPlayerMoving) local PluginManager = cPluginManager:Get() -- Command bindings @@ -200,7 +200,7 @@ function Initialize(Plugin) local PluginManager = cPluginManager:Get() PluginManager:BindCommand("/explode", "derpyplugin.explode", Explode, " ~ Explode a player"); - cPluginManager.AddHook(cPluginManager.HOOK_COLLECTING_PICKUP, OnCollectingPickup) + cPluginManager:AddHook(cPluginManager.HOOK_COLLECTING_PICKUP, OnCollectingPickup) LOG("Initialised " .. Plugin:GetName() .. " v." .. Plugin:GetVersion()) return true |