diff options
Diffstat (limited to '')
-rw-r--r-- | Server/Plugins/APIDump/Writing-a-Cuberite-plugin.html | 7 |
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 |