diff options
author | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2013-09-02 15:15:28 +0200 |
---|---|---|
committer | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2013-09-02 15:15:28 +0200 |
commit | 20b64e18e49550e7a105899045fd51be192e86bc (patch) | |
tree | c261c71ea2feb99bc5d4b058da5811c6b80db70c /MCServer/Plugins/DiamondMover/DiamondMover.lua | |
parent | Minecart enhancements [SEE DESC] (diff) | |
parent | Exported BroadcastSoundEffect and BroadcastSoundParticleEffect to the Lua API (diff) | |
download | cuberite-20b64e18e49550e7a105899045fd51be192e86bc.tar cuberite-20b64e18e49550e7a105899045fd51be192e86bc.tar.gz cuberite-20b64e18e49550e7a105899045fd51be192e86bc.tar.bz2 cuberite-20b64e18e49550e7a105899045fd51be192e86bc.tar.lz cuberite-20b64e18e49550e7a105899045fd51be192e86bc.tar.xz cuberite-20b64e18e49550e7a105899045fd51be192e86bc.tar.zst cuberite-20b64e18e49550e7a105899045fd51be192e86bc.zip |
Diffstat (limited to '')
-rw-r--r-- | MCServer/Plugins/DiamondMover/DiamondMover.lua | 12 |
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 + + + + |