summaryrefslogtreecommitdiffstats
path: root/Server/Plugins/APIDump/Writing-a-Cuberite-plugin.html
diff options
context:
space:
mode:
author12xx12 <44411062+12xx12@users.noreply.github.com>2021-05-29 18:28:57 +0200
committerGitHub <noreply@github.com>2021-05-29 18:28:57 +0200
commite5fc65264bf0d2174bf29f3512d105297a6c739f (patch)
treebc0c3967555333e7657b3ee8dd2185c25cbadbe8 /Server/Plugins/APIDump/Writing-a-Cuberite-plugin.html
parentadded check for harvestation in oreblock handler (#5226) (diff)
downloadcuberite-e5fc65264bf0d2174bf29f3512d105297a6c739f.tar
cuberite-e5fc65264bf0d2174bf29f3512d105297a6c739f.tar.gz
cuberite-e5fc65264bf0d2174bf29f3512d105297a6c739f.tar.bz2
cuberite-e5fc65264bf0d2174bf29f3512d105297a6c739f.tar.lz
cuberite-e5fc65264bf0d2174bf29f3512d105297a6c739f.tar.xz
cuberite-e5fc65264bf0d2174bf29f3512d105297a6c739f.tar.zst
cuberite-e5fc65264bf0d2174bf29f3512d105297a6c739f.zip
Diffstat (limited to 'Server/Plugins/APIDump/Writing-a-Cuberite-plugin.html')
-rw-r--r--Server/Plugins/APIDump/Writing-a-Cuberite-plugin.html6
1 files changed, 3 insertions, 3 deletions
diff --git a/Server/Plugins/APIDump/Writing-a-Cuberite-plugin.html b/Server/Plugins/APIDump/Writing-a-Cuberite-plugin.html
index 6d53ccaab..8c8008530 100644
--- a/Server/Plugins/APIDump/Writing-a-Cuberite-plugin.html
+++ b/Server/Plugins/APIDump/Writing-a-Cuberite-plugin.html
@@ -42,12 +42,12 @@ function Initialize(Plugin)
-- Command Bindings
- LOG("Initialised " .. Plugin:GetName() .. " v." .. Plugin:GetVersion())
+ LOG("Initialised version " .. Plugin:GetVersion())
return true
end
function OnDisable()
- LOG(PLUGIN:GetName() .. " is shutting down...")
+ LOG("Shutting down...")
end
</pre>
<p>
@@ -56,7 +56,7 @@ end
<li><b>function Initialize</b> is called on plugin startup. It is the place where the plugin is set up.</li>
<li><b>Plugin:SetName</b> sets the name of the plugin.</li>
<li><b>Plugin:SetVersion</b> sets the revision number of the plugin. This must be an integer.</li>
- <li><b>LOG</b> logs to console a message, in this case, it prints that the plugin was initialised.</li>
+ <li><b>LOG</b> logs to console a message, in this case, it prints that the plugin was initialised. This will add a prefix with the name of your plugin.</li>
<li>The <b>PLUGIN</b> variable just stores this plugin's object, so GetName() can be called in OnDisable (as no Plugin parameter is passed there, contrary to Initialize).
This global variable is only needed if you want to know the plugin details (name, etc.) when shutting down.</li>
<li><b>function OnDisable</b> is called when the plugin is disabled, commonly when the server is shutting down. Perform cleanup and logging here.</li>