From 086c8b1834bfca6a4af912abbd13fd570f7b0b33 Mon Sep 17 00:00:00 2001 From: Mattes D Date: Wed, 16 Dec 2015 15:04:47 +0100 Subject: Revised the explosion-related Lua API and docs. Fixes #2746. --- Server/Plugins/APIDump/Writing-a-Cuberite-plugin.html | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'Server/Plugins/APIDump/Writing-a-Cuberite-plugin.html') 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 API docs 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 API docs 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 -- cgit v1.2.3