summaryrefslogtreecommitdiff
path: root/cycle.py
diff options
context:
space:
mode:
authorjomo <github@jomo.tv>2014-07-06 20:49:11 +0200
committerjomo <github@jomo.tv>2014-07-06 20:49:11 +0200
commit1017e64095e6f18e0cbfdae826c945f44331a5dc (patch)
tree73980e6d5ed88580c40c8d1c6b3d8f7baa3680cb /cycle.py
parent4ef56eab9743d4f0fafb210a42d9bada822d3df8 (diff)
use cycle plugin in creative mode only
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 21b7022..c35e9bc 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 and not player.isSneaking():
+ if str(player.getGameMode()) == "CREATIVE" 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