summaryrefslogtreecommitdiffstats
path: root/MCServer/Plugins/DiamondMover/DiamondMover.lua
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2013-08-21 22:03:50 +0200
committermadmaxoft <github@xoft.cz>2013-08-21 22:03:50 +0200
commit268661990dbfde430383ce21d9684e37ee2135d9 (patch)
treeb9961de605d657fa89f5a5e6a3d2a7df8113c101 /MCServer/Plugins/DiamondMover/DiamondMover.lua
parentUpdated the Debuggers plugin to the #121 API. (diff)
downloadcuberite-268661990dbfde430383ce21d9684e37ee2135d9.tar
cuberite-268661990dbfde430383ce21d9684e37ee2135d9.tar.gz
cuberite-268661990dbfde430383ce21d9684e37ee2135d9.tar.bz2
cuberite-268661990dbfde430383ce21d9684e37ee2135d9.tar.lz
cuberite-268661990dbfde430383ce21d9684e37ee2135d9.tar.xz
cuberite-268661990dbfde430383ce21d9684e37ee2135d9.tar.zst
cuberite-268661990dbfde430383ce21d9684e37ee2135d9.zip
Diffstat (limited to '')
-rw-r--r--MCServer/Plugins/DiamondMover/DiamondMover.lua12
1 files changed, 6 insertions, 6 deletions
diff --git a/MCServer/Plugins/DiamondMover/DiamondMover.lua b/MCServer/Plugins/DiamondMover/DiamondMover.lua
index c89a3394f..0fdd32250 100644
--- a/MCServer/Plugins/DiamondMover/DiamondMover.lua
+++ b/MCServer/Plugins/DiamondMover/DiamondMover.lua
@@ -9,7 +9,6 @@
-- Global variables
-PLUGIN = {} -- Reference to own plugin object
MOVER_SIZE_X = 4;
MOVER_SIZE_Y = 4;
MOVER_SIZE_Z = 4;
@@ -19,13 +18,10 @@ MOVER_SIZE_Z = 4;
function Initialize(Plugin)
- PLUGIN = Plugin;
-
Plugin:SetName("DiamondMover");
Plugin:SetVersion(1);
- PluginManager = cRoot:Get():GetPluginManager();
- PluginManager:AddHook(Plugin, cPluginManager.HOOK_PLAYER_USED_ITEM);
+ cPluginManager.AddHook(cPluginManager.HOOK_PLAYER_USED_ITEM, OnPlayerUsedItem);
return true;
end
@@ -80,4 +76,8 @@ function OnPlayerUsedItem(Player, BlockX, BlockY, BlockZ, BlockFace, CursorX, Cu
Area:Write(Player:GetWorld(), BlockX - MOVER_SIZE_X, BlockY - MOVER_SIZE_Y, BlockZ - MOVER_SIZE_Z);
return false;
end
-end \ No newline at end of file
+end
+
+
+
+