summaryrefslogtreecommitdiffstats
path: root/MCServer
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2013-09-07 18:53:14 +0200
committermadmaxoft <github@xoft.cz>2013-09-07 18:53:14 +0200
commit06b01af017d373377a58604fa36a1607323fa6dc (patch)
tree04ec095164e03b0fd010b8237899e7bca7f3789b /MCServer
parentDebuggers plugin: Removed unneeded global (diff)
downloadcuberite-06b01af017d373377a58604fa36a1607323fa6dc.tar
cuberite-06b01af017d373377a58604fa36a1607323fa6dc.tar.gz
cuberite-06b01af017d373377a58604fa36a1607323fa6dc.tar.bz2
cuberite-06b01af017d373377a58604fa36a1607323fa6dc.tar.lz
cuberite-06b01af017d373377a58604fa36a1607323fa6dc.tar.xz
cuberite-06b01af017d373377a58604fa36a1607323fa6dc.tar.zst
cuberite-06b01af017d373377a58604fa36a1607323fa6dc.zip
Diffstat (limited to 'MCServer')
-rw-r--r--MCServer/Plugins/Debuggers/Debuggers.lua16
1 files changed, 16 insertions, 0 deletions
diff --git a/MCServer/Plugins/Debuggers/Debuggers.lua b/MCServer/Plugins/Debuggers/Debuggers.lua
index f5cd57116..b895da05e 100644
--- a/MCServer/Plugins/Debuggers/Debuggers.lua
+++ b/MCServer/Plugins/Debuggers/Debuggers.lua
@@ -43,6 +43,7 @@ function Initialize(Plugin)
PluginManager:BindCommand("/ench", "debuggers", HandleEnchCmd, "- Provides an instant dummy enchantment window");
PluginManager:BindCommand("/fs", "debuggers", HandleFoodStatsCmd, "- Turns regular foodstats message on or off");
PluginManager:BindCommand("/arr", "debuggers", HandleArrowCmd, "- Creates an arrow going away from the player");
+ PluginManager:BindCommand("/fb", "debuggers", HandleFireballCmd, "- Creates a ghast fireball as if shot by the player");
-- Enable the following line for BlockArea / Generator interface testing:
-- PluginManager:AddHook(Plugin, cPluginManager.HOOK_CHUNK_GENERATED);
@@ -823,3 +824,18 @@ end
+
+function HandleFireballCmd(a_Split, a_Player)
+ local World = a_Player:GetWorld();
+ local Pos = a_Player:GetEyePosition();
+ local Speed = a_Player:GetLookVector();
+ Speed:Normalize();
+ Pos = Pos + Speed * 2;
+
+ World:CreateProjectile(Pos.x, Pos.y, Pos.z, cProjectileEntity.pkGhastFireball, a_Player, Speed * 10);
+ return true;
+end
+
+
+
+