summaryrefslogtreecommitdiff
path: root/cycle.py
diff options
context:
space:
mode:
authorjomo <github@jomo.tv>2014-07-17 22:13:49 +0200
committerjomo <github@jomo.tv>2014-07-17 22:13:49 +0200
commitebf8a22bae30c9060e2520be288c7d0b3af84582 (patch)
tree87afeedcdc85369e41ff697a9db5793577183ea1 /cycle.py
parenta5e9fd348f7a940ddbff497f7ee9edd7ce5967a4 (diff)
using is_creative helper
Diffstat (limited to 'cycle.py')
-rw-r--r--cycle.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/cycle.py b/cycle.py
index 2a2ee8f..eba8630 100644
--- a/cycle.py
+++ b/cycle.py
@@ -44,7 +44,7 @@ def on_cycler_command(sender, args):
@hook.event("player.PlayerItemHeldEvent", "normal")
def on_slot_change(event):
player = event.getPlayer()
- if str(player.getGameMode()) == "CREATIVE" and str(player.getUniqueId()) not in no_cyclers and not player.isSneaking():
+ if is_creative(player) and str(player.getUniqueId()) 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