summaryrefslogtreecommitdiff
path: root/cycle.py
diff options
context:
space:
mode:
authorjomo <github@jomo.tv>2014-07-17 22:24:45 +0200
committerjomo <github@jomo.tv>2014-07-17 22:24:45 +0200
commit8db6085d63ce20a8eaa2f7b68809dc6485bf56fd (patch)
tree2363ef834cb1cc7bf79769a5d5caae521d2119db /cycle.py
parentebf8a22bae30c9060e2520be288c7d0b3af84582 (diff)
use uid(player) helper method
Diffstat (limited to 'cycle.py')
-rw-r--r--cycle.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/cycle.py b/cycle.py
index eba8630..7795f23 100644
--- a/cycle.py
+++ b/cycle.py
@@ -20,7 +20,7 @@ def on_cycler_command(sender, args):
return True
cmd = args[0].lower()
- pid = str(sender.getUniqueId())
+ pid = uid(sender)
nop = pid in no_cyclers
if cmd == "on":
if nop:
@@ -44,7 +44,7 @@ def on_cycler_command(sender, args):
@hook.event("player.PlayerItemHeldEvent", "normal")
def on_slot_change(event):
player = event.getPlayer()
- if is_creative(player) and str(player.getUniqueId()) not in no_cyclers and not player.isSneaking():
+ if is_creative(player) and uid(player) not in no_cyclers and not player.isSneaking():
prev_slot = event.getPreviousSlot()
new_slot = event.getNewSlot()
if (prev_slot == 0 and new_slot == 8): # left -> right