summaryrefslogtreecommitdiffstats
path: root/MCServer/Plugins/DiamondMover/DiamondMover.lua
diff options
context:
space:
mode:
Diffstat (limited to 'MCServer/Plugins/DiamondMover/DiamondMover.lua')
-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
+
+
+
+