diff options
author | Mattes D <github@xoft.cz> | 2015-12-16 15:04:47 +0100 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2015-12-18 12:40:34 +0100 |
commit | 086c8b1834bfca6a4af912abbd13fd570f7b0b33 (patch) | |
tree | 7e95f9e8102c3cc7910c7a513e4cc77bce764aed /Server/Plugins/APIDump/Writing-a-Cuberite-plugin.html | |
parent | Merge pull request #2770 from cuberite/RemoveChunkDataCollector (diff) | |
download | cuberite-086c8b1834bfca6a4af912abbd13fd570f7b0b33.tar cuberite-086c8b1834bfca6a4af912abbd13fd570f7b0b33.tar.gz cuberite-086c8b1834bfca6a4af912abbd13fd570f7b0b33.tar.bz2 cuberite-086c8b1834bfca6a4af912abbd13fd570f7b0b33.tar.lz cuberite-086c8b1834bfca6a4af912abbd13fd570f7b0b33.tar.xz cuberite-086c8b1834bfca6a4af912abbd13fd570f7b0b33.tar.zst cuberite-086c8b1834bfca6a4af912abbd13fd570f7b0b33.zip |
Diffstat (limited to 'Server/Plugins/APIDump/Writing-a-Cuberite-plugin.html')
-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 |