diff options
author | jomo <github@jomo.tv> | 2014-07-17 22:24:45 +0200 |
---|---|---|
committer | jomo <github@jomo.tv> | 2014-07-17 22:24:45 +0200 |
commit | 8db6085d63ce20a8eaa2f7b68809dc6485bf56fd (patch) | |
tree | 2363ef834cb1cc7bf79769a5d5caae521d2119db /tilehelper.py | |
parent | ebf8a22bae30c9060e2520be288c7d0b3af84582 (diff) |
use uid(player) helper method
Diffstat (limited to 'tilehelper.py')
-rw-r--r-- | tilehelper.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tilehelper.py b/tilehelper.py index 0258131..e8c2af6 100644 --- a/tilehelper.py +++ b/tilehelper.py @@ -35,7 +35,7 @@ def on_place_block(event): block = event.getBlockPlaced() 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") == uid(player) 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(): # stack block in directions for direction in th.get("directions"): @@ -76,7 +76,7 @@ def on_break_block(event): 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): + if th.get("owner") == uid(player) 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 for direction in th.get("directions"): @@ -107,7 +107,7 @@ def on_block_interact(event): block = event.getClickedBlock() 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): + if th.get("owner") == uid(player) 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 for direction in th.get("directions"): |