summaryrefslogtreecommitdiffstats
path: root/MCServer
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2013-08-30 14:32:07 +0200
committermadmaxoft <github@xoft.cz>2013-08-30 14:32:07 +0200
commitc28ccdc9d56497d42c2a97554a96de76e0d2ee68 (patch)
treef1a1f5629ae7e2565330580ab4e6fe76466acf6e /MCServer
parentAdded the login sequence of a vanilla client to the docs. (diff)
parentShooting a bow kinda works. (diff)
downloadcuberite-c28ccdc9d56497d42c2a97554a96de76e0d2ee68.tar
cuberite-c28ccdc9d56497d42c2a97554a96de76e0d2ee68.tar.gz
cuberite-c28ccdc9d56497d42c2a97554a96de76e0d2ee68.tar.bz2
cuberite-c28ccdc9d56497d42c2a97554a96de76e0d2ee68.tar.lz
cuberite-c28ccdc9d56497d42c2a97554a96de76e0d2ee68.tar.xz
cuberite-c28ccdc9d56497d42c2a97554a96de76e0d2ee68.tar.zst
cuberite-c28ccdc9d56497d42c2a97554a96de76e0d2ee68.zip
Diffstat (limited to '')
-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