Dev #29
16
bpm.py
16
bpm.py
@ -18,6 +18,18 @@ def block_place(event):
|
||||
elif (material == Material.CAULDRON) and py_player.cauldron_toggle:
|
||||
block.setData(block.getData() + 3)
|
||||
|
||||
@hook.event("player.PlayerInteractEvent", "high")
|
||||
def on_interact(event):
|
||||
block = event.getClickedBlock()
|
||||
sender = event.getPlayer()
|
||||
py_player = get_py_player(sender)
|
||||
if str(event.getAction()) != "RIGHT_CLICK_BLOCK":
|
||||
return
|
||||
if block.getType() == Material.CAULDRON and py_player.cauldron_toggle:
|
||||
block.setData(block.getData() - 1 if block.getData() > 0 else 3)
|
||||
else:
|
||||
return
|
||||
|
||||
def help(sender):
|
||||
msg(sender, "&a-=[&6BPM&a]=-")
|
||||
msg(sender, "&6Aliases for /toggle: \n &e/set, /setting and /config\n")
|
||||
@ -51,4 +63,6 @@ def toggle_command(sender, cmd, label, args):
|
||||
elif sender.getWorld() != "creative":
|
||||
msg(sender, "&aBPM doesn't work in this world.")
|
||||
else:
|
||||
msg(sender, "&aNo permission.")
|
||||
msg(sender, "&aNo permission.")
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user