Cancel Event won't work

Discussion in 'Skript' started by Brandawg, May 10, 2017.

  1. So I am making a class skript and my clan is when a player clicks with a "wand"/hoe I cancel the event if there not the class. I just have it set for everyone right now but the player gets the message and the ability still happens. I am also using this plugin https://www.spigotmc.org/resources/...ts-25-custom-abilities-item-editor-gui.39267/. Anyone have any idea on how to stop this from happening? This is my code.
    Code (Text):
    on click:
        player is holding a hoe
        cancel event
        send "&cYou can't use that weapon"
     
  2. Try to remove player is holding hoe line and changing first line to

    on rightclick with hoe:
     
  3. Here, try this code.

    Code (Text):
    on rightclick with hoe:
        cancel event
        send "&cYou can't use that weapon"
     
  4. but you can left click and right click
     
  5. That's exactly what I suggested...
     
  6. you do it wrong is:

    Code (Text):
    on right click:
      player's tool is a hoe
      cancel event
     
  7. Try this:
    Code (Text):

    on click:
        if player is holding a hoe:
            cancel event
            send "&cYou can't use that weapon"