summaryrefslogtreecommitdiffstats
path: root/MCServer/Plugins
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2013-08-22 09:07:31 +0200
committermadmaxoft <github@xoft.cz>2013-08-22 09:07:31 +0200
commit9b987598bb90a1593421b9a2fe3eaca3a521ee23 (patch)
treed77547788439c1b602d2a6b0c1361c83549dffaf /MCServer/Plugins
parentArrows can spawn on the client. (diff)
downloadcuberite-9b987598bb90a1593421b9a2fe3eaca3a521ee23.tar
cuberite-9b987598bb90a1593421b9a2fe3eaca3a521ee23.tar.gz
cuberite-9b987598bb90a1593421b9a2fe3eaca3a521ee23.tar.bz2
cuberite-9b987598bb90a1593421b9a2fe3eaca3a521ee23.tar.lz
cuberite-9b987598bb90a1593421b9a2fe3eaca3a521ee23.tar.xz
cuberite-9b987598bb90a1593421b9a2fe3eaca3a521ee23.tar.zst
cuberite-9b987598bb90a1593421b9a2fe3eaca3a521ee23.zip
Diffstat (limited to 'MCServer/Plugins')
-rw-r--r--MCServer/Plugins/Debuggers/Debuggers.lua18
1 files changed, 18 insertions, 0 deletions
diff --git a/MCServer/Plugins/Debuggers/Debuggers.lua b/MCServer/Plugins/Debuggers/Debuggers.lua
index 599b8a3a3..be16e3465 100644
--- a/MCServer/Plugins/Debuggers/Debuggers.lua
+++ b/MCServer/Plugins/Debuggers/Debuggers.lua
@@ -45,6 +45,7 @@ function Initialize(Plugin)
PluginManager:BindCommand("/spidey", "debuggers", HandleSpideyCmd, "- Shoots a line of web blocks until it hits non-air");
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");
-- Enable the following line for BlockArea / Generator interface testing:
-- PluginManager:AddHook(Plugin, cPluginManager.HOOK_CHUNK_GENERATED);
@@ -794,6 +795,7 @@ function HandleEnchCmd(a_Split, a_Player)
Wnd:SetProperty(0, 10);
Wnd:SetProperty(1, 15);
Wnd:SetProperty(2, 25);
+ return true;
end
@@ -802,6 +804,22 @@ end
function HandleFoodStatsCmd(a_Split, a_Player)
g_ShowFoodStats = not(g_ShowFoodStats);
+ return true;
+end
+
+
+
+
+
+function HandleArrowCmd(a_Split, a_Player)
+ local World = a_Player:GetWorld();
+ local Pos = a_Player:GetEyePosition();
+ local Speed = a_Player:GetLookVector();
+ Speed:Normalize();
+ Pos = Pos + Speed;
+
+ World:CreateProjectile(Pos.x, Pos.y, Pos.z, cProjectileEntity.pkArrow, a_Player, Speed * 10);
+ return true;
end