summaryrefslogtreecommitdiff
path: root/cycle.py
diff options
context:
space:
mode:
authorjomo <github@jomo.tv>2014-06-29 18:26:02 +0200
committerjomo <github@jomo.tv>2014-06-29 18:26:02 +0200
commit327772b03b8152cbb0600e96a69e7eb2009ad3a1 (patch)
treeda99252f37162f2b2886339438a575594bc0e0a1 /cycle.py
parentf141f392f8ea713410b77cec59dec45b6851089e (diff)
don't cycle when sneaking
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 4a601ba..d706d39 100644
--- a/cycle.py
+++ b/cycle.py
@@ -44,7 +44,7 @@ def onCyclerCommand(sender, args):
@hook.event("player.PlayerItemHeldEvent", "normal")
def onSlotChange(event):
player = event.getPlayer()
- if str(player.getUniqueId()) not in no_cyclers:
+ if str(player.getUniqueId()) not in no_cyclers and not player.isSneakng():
prev_slot = event.getPreviousSlot()
new_slot = event.getNewSlot()
if (prev_slot == 0 and new_slot == 8): # left -> right