From 682f22b99d5f8c44d89633a04a697ec882e8fc73 Mon Sep 17 00:00:00 2001 From: jomo Date: Tue, 10 Jun 2014 04:53:36 +0200 Subject: [PATCH] bugfixes --- tilehelper.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tilehelper.py b/tilehelper.py index e0e6f64..89b2036 100644 --- a/tilehelper.py +++ b/tilehelper.py @@ -64,10 +64,10 @@ def onPlaceBlockInRegion(event): def onPlaceBlockInRegion(event): if not event.isCancelled(): player = event.getPlayer() - block = event.getBlockPlaced() + block = event.getBlock() for th in tilehelpers: area = th.get("area") - if th.get("owner") == str(player.getUniqueId()) and str(block.getWorld().getUID()) == th.get("world") and block.getX() in range(area[0][0], area[0][1]+1) and block.getY() in range(area[1][0], area[1][1]+1) and block.getZ() in range(area[2][0], area[2][1]+1) and event.canBuild(): + if th.get("owner") == str(player.getUniqueId()) and str(block.getWorld().getUID()) == th.get("world") and block.getX() in range(area[0][0], area[0][1]+1) and block.getY() in range(area[1][0], area[1][1]+1) and block.getZ() in range(area[2][0], area[2][1]+1): # stack block in directions msg(player, "&abroke block in region")