#~Banhammer Script v1 by Jumpsplat120 # #/hammer, /bh or /banhammer to give yourself the Banhammer. #I wouldn't suggest using it as a guide on how to code :p # # HammerEvent: type: world events: #The hammer is a custom nether brick. Only usable if an OP, otherwise does literally nothing. on player damages entity with:HammerItem: - if { - if matches player { - if matches player { - flag banPlayer: - flag banPlayerName: - ban add "reason:You were hit with the banhammer!" - narrate "You banned ! Right click with the banhammer to unban them." } } } else { - determine cancelled } on player right clicks with HammerItem: - if { - Narrate "You have unbanned ." - ban remove } #The custom Hammer. If you want to change what it looks like, change the material HammerItem: type: item #Change this if you want the item to look different material: i@nether_brick_item display name: Banhammer lore: - Left click to ban someone. - Right click to unban the most recent person. #The command to give yourself the Ban Hammer. Only runs if you are OP. Hammer Command: type: command name: Banhammer description: Run this command to give yourself the banhammer item. (Command & item does nothing if you are not OP'd) usage: /Banhammer OR /bh OR /hammer aliases: - bh - hammer script: - if !> { - narrate "You do not have permission for that command." - queue clear } else { - give HammerItem }