summaryrefslogtreecommitdiff
path: root/blockplacemods.py
diff options
context:
space:
mode:
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)