1. Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  2. LOOKING FOR A VERSION OF SKRIPT?

    You can always check out our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Solved Detecting a leather helmet

Discussion in 'Skript' started by SoMuchWessel, Jan 23, 2018.

Thread Status:
Not open for further replies.
  1. SoMuchWessel

    SoMuchWessel Active Member

    Joined:
    Apr 3, 2017
    Messages:
    147
    Likes Received:
    2
    Hey guys,

    I got a weird bugg.
    I want this helmet to be detected when you wear it:
    [​IMG]

    So i wrote this code:

    Code (Skript):
    1. on rightclick on chest:
    2.     if player is wearing a leather helmet of curse of binding 1 named "&4Red":
    3.         send "Nice hat sir"
    But it isnt working, only with a normal undyed helmet.

    Can you guys help me out?
     
  2. Snow-Pyon

    Snow-Pyon Well-Known Member

    Joined:
    Jan 25, 2017
    Messages:
    1,235
    Likes Received:
    176
    Medals:
    It isn't a bug, it's just that you're checking if the item is a helmet with curse 1 named "<red>Red", so it matches exactly that; no more, no less.

    If you want check everything without being that specific then split the condition like this:

    Code (Skript):
    1. if type of player's helm is a leather helmet:
    2.   if player's helm is enchanted with curse of binding 1:
    3.     if display name of player's helm is "<red>Red":
    4.       #do stuff
     
  3. SoMuchWessel

    SoMuchWessel Active Member

    Joined:
    Apr 3, 2017
    Messages:
    147
    Likes Received:
    2
    Oh thanks, this worked!
     
Thread Status:
Not open for further replies.

Share This Page

Loading...