From 1017e64095e6f18e0cbfdae826c945f44331a5dc Mon Sep 17 00:00:00 2001 From: jomo Date: Sun, 6 Jul 2014 20:49:11 +0200 Subject: use cycle plugin in creative mode only --- cycle.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cycle.py') 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 -- cgit v1.2.3