summaryrefslogtreecommitdiffstats
path: root/MCServer
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-02-07 11:09:42 +0100
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-02-07 11:09:42 +0100
commited47a8e409ac8d5273a3d6b61aba90248cc4c70d (patch)
treedc98dfc9bebd34b4746bd4ae83812eb24aef763f /MCServer
parentAdded a sanity check to cBlockArea:Crop() (diff)
downloadcuberite-ed47a8e409ac8d5273a3d6b61aba90248cc4c70d.tar
cuberite-ed47a8e409ac8d5273a3d6b61aba90248cc4c70d.tar.gz
cuberite-ed47a8e409ac8d5273a3d6b61aba90248cc4c70d.tar.bz2
cuberite-ed47a8e409ac8d5273a3d6b61aba90248cc4c70d.tar.lz
cuberite-ed47a8e409ac8d5273a3d6b61aba90248cc4c70d.tar.xz
cuberite-ed47a8e409ac8d5273a3d6b61aba90248cc4c70d.tar.zst
cuberite-ed47a8e409ac8d5273a3d6b61aba90248cc4c70d.zip
Diffstat (limited to 'MCServer')
-rw-r--r--MCServer/Plugins/Debuggers/Debuggers.lua19
1 files changed, 19 insertions, 0 deletions
diff --git a/MCServer/Plugins/Debuggers/Debuggers.lua b/MCServer/Plugins/Debuggers/Debuggers.lua
index ba410dd49..c80957511 100644
--- a/MCServer/Plugins/Debuggers/Debuggers.lua
+++ b/MCServer/Plugins/Debuggers/Debuggers.lua
@@ -149,6 +149,25 @@ function OnPlayerUsingItem(Player, BlockX, BlockY, BlockZ, BlockFace, CursorX, C
return false;
end
+
+ -- Rclk with an ender pearl saves a predefined area around the cursor into a .schematic file
+ if (Player:GetEquippedItem().m_ItemType == E_ITEM_ENDER_PEARL) then
+ local Area = cBlockArea();
+ if not(Area:Read(Player:GetWorld(),
+ BlockX - 8, BlockX + 8, BlockY - 8, BlockY + 8, BlockZ - 8, BlockZ + 8)
+ ) then
+ LOG("LUA: Area couldn't be read");
+ return false;
+ end
+ LOG("LUA: Area read, saving now.");
+ if not(Area:SaveToSchematicFile("schematics/out.schematic")) then
+ LOG("LUA: Cannot save schematic file.");
+ return false;
+ end
+ LOG("LUA: Done.");
+ return false;
+ end
+
end