summaryrefslogtreecommitdiffstats
path: root/Server/Plugins/APIDump/Writing-a-Cuberite-plugin.html
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2015-12-18 14:32:01 +0100
committerMattes D <github@xoft.cz>2015-12-18 14:32:01 +0100
commit749274aa4340485dfed6222af55101444eb15603 (patch)
tree7e95f9e8102c3cc7910c7a513e4cc77bce764aed /Server/Plugins/APIDump/Writing-a-Cuberite-plugin.html
parentMerge pull request #2770 from cuberite/RemoveChunkDataCollector (diff)
parentRevised the explosion-related Lua API and docs. (diff)
downloadcuberite-749274aa4340485dfed6222af55101444eb15603.tar
cuberite-749274aa4340485dfed6222af55101444eb15603.tar.gz
cuberite-749274aa4340485dfed6222af55101444eb15603.tar.bz2
cuberite-749274aa4340485dfed6222af55101444eb15603.tar.lz
cuberite-749274aa4340485dfed6222af55101444eb15603.tar.xz
cuberite-749274aa4340485dfed6222af55101444eb15603.tar.zst
cuberite-749274aa4340485dfed6222af55101444eb15603.zip
Diffstat (limited to 'Server/Plugins/APIDump/Writing-a-Cuberite-plugin.html')
-rw-r--r--Server/Plugins/APIDump/Writing-a-Cuberite-plugin.html7
1 files changed, 4 insertions, 3 deletions
diff --git a/Server/Plugins/APIDump/Writing-a-Cuberite-plugin.html b/Server/Plugins/APIDump/Writing-a-Cuberite-plugin.html
index 2b6af0d82..a75a925b3 100644
--- a/Server/Plugins/APIDump/Writing-a-Cuberite-plugin.html
+++ b/Server/Plugins/APIDump/Writing-a-Cuberite-plugin.html
@@ -209,10 +209,11 @@ function Explode(Split, Player)
-- Create a callback ExplodePlayer with parameter Explodee, which Cuberite calls for every player on the server
local HasExploded = false
local ExplodePlayer = function(Explodee)
- -- If the player we are currently at is the one we specified as the parameter
+ -- If the player name matches exactly
if (Explodee:GetName() == Split[2]) then
- -- Create an explosion at the same position as they are; see <a href="cWorld.html">API docs</a> for further details of this function
- Player:GetWorld():DoExplosionAt(Explodee:GetPosX(), Explodee:GetPosY(), Explodee:GetPosZ(), false, esPlugin)
+ -- Create an explosion of force level 2 at the same position as they are
+ -- see <a href="cWorld.html">API docs</a> for further details of this function
+ Player:GetWorld():DoExplosionAt(2, Explodee:GetPosX(), Explodee:GetPosY(), Explodee:GetPosZ(), false, esPlugin)
Player:SendMessageSuccess(Split[2] .. " was successfully exploded")
HasExploded = true;
return true -- Signalize to Cuberite that we do not need to call this callback for any more players