diff options
author | Dico200 <dico.karssiens@gmail.com> | 2015-04-29 14:41:48 +0200 |
---|---|---|
committer | Dico200 <dico.karssiens@gmail.com> | 2015-04-29 14:41:48 +0200 |
commit | 884e0a349138a49a0b15fc37bd470c7a51a288a6 (patch) | |
tree | 2a38f84bcaf2dec782c8a6afe14238f9154e88b1 /blockplacemods.py | |
parent | 4e1398e51431bd90e29add4379b7630026f393e4 (diff) |
Added perm check to interactevent im blockplacemods
fixes #19
Diffstat (limited to 'blockplacemods.py')
-rw-r--r-- | blockplacemods.py | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/blockplacemods.py b/blockplacemods.py index 6258a13..4f0dc2d 100644 --- a/blockplacemods.py +++ b/blockplacemods.py @@ -1,5 +1,6 @@ from helpers import * from basecommands import simplecommand +import org.bukkit.event.block.BlockBreakEvent as BlockBreakEvent denyslabcorrection = open_json_file("denyslabcorrection", []) #Players that don't want slabs corrected denyautofill = open_json_file("denyautocauldronfill", []) @@ -109,10 +110,7 @@ def on_interact(event): if event.hasItem() and not str(event.getItem().getType()) == "REDSTONE": return block = event.getClickedBlock() - if str(block.getType()) == "CAULDRON" and block.getData() > 0: + event2 = BlockBreakEvent(block, player) + server.getPluginManager().callEvent(event2) + if not event2.isCancelled() and str(block.getType()) == "CAULDRON" and block.getData() > 0: block.setData(block.getData() - 1) #Lower water level by one - - - - - |