summaryrefslogtreecommitdiff
path: root/blockplacemods.py
diff options
context:
space:
mode:
authorDico200 <dico.karssiens@gmail.com>2015-05-13 21:37:23 +0200
committerDico200 <dico.karssiens@gmail.com>2015-05-13 21:37:23 +0200
commit230e427f04347eb7f6eece55cba893dbec20ff4f (patch)
tree00709568d998ab8e1ab8b0baaded364daac36a4d /blockplacemods.py
parent88e0a298b51fe61b3e64131fae93e236119db615 (diff)
Fix BlockBreakEvent being called on lever switch
Diffstat (limited to 'blockplacemods.py')
-rw-r--r--blockplacemods.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/blockplacemods.py b/blockplacemods.py
index 87bac71..3882d4f 100644
--- a/blockplacemods.py
+++ b/blockplacemods.py
@@ -117,8 +117,10 @@ def on_interact(event):
if event.hasItem() and not str(event.getItem().getType()) == "REDSTONE":
return
block = event.getClickedBlock()
+ if str(block.getType()) != "CAULDRON":
+ return
event2 = BlockBreakEvent(block, player)
server.getPluginManager().callEvent(event2)
- data = block.getData()
- if not event2.isCancelled() and str(block.getType()) == "CAULDRON":
+ if not event2.isCancelled():
+ data = block.getData()
block.setData(data - 1 if data > 0 else 3)