Solved Detecting a leather helmet

  • 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!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

SoMuchWessel

Active Member
Apr 3, 2017
147
3
18
46
Hey guys,

I got a weird bugg.
I want this helmet to be detected when you wear it:
29y5zky.png


So i wrote this code:

code_language.skript:
on rightclick on chest:
    if player is wearing a leather helmet of curse of binding 1 named "&4Red":
        send "Nice hat sir"

But it isnt working, only with a normal undyed helmet.

Can you guys help me out?
 
  • Like
Reactions: DannyDaMannyy
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_language.skript:
if type of player's helm is a leather helmet:
  if player's helm is enchanted with curse of binding 1:
    if display name of player's helm is "<red>Red":
      #do stuff
 
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_language.skript:
if type of player's helm is a leather helmet:
  if player's helm is enchanted with curse of binding 1:
    if display name of player's helm is "<red>Red":
      #do stuff

Oh thanks, this worked!
 
Status
Not open for further replies.