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.

Loop the inventory of player's tool

Discussion in 'Skript' started by pokw, Jan 23, 2021.

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

    pokw Member

    Joined:
    Jun 3, 2019
    Messages:
    48
    Likes Received:
    1
    How do I loop the inventory of a player's tool? This is the code I have right now if someone can help.

    Code (Text):
    1.  
    2. command /command:
    3.   trigger:
    4.     player's tool is shulker:
    5.       loop the inventory of player's tool:
    6.         if loop-inventory contains dirt:
    7.           send "loop inventory contains dirt"
    8.         else:
    9.           send "loop inventory does not contain dirt"
    10.        send "loop started"
    11.     send "command executed"
    12.  
    Errors:
    576e8d5d3b2a7b716082a03c0fcd6a99.png
     
  2. Marc

    Marc Active Member

    Joined:
    Nov 27, 2020
    Messages:
    94
    Likes Received:
    0
    Are you trying to know what the player is holding? or are you trying to see whats in their inventory?
    Inventory:
    Code (Text):
    1. Loop player's inventory
    Held item:
    Code (Text):
    1. if player's held item is #blah blah
     
  3. pokw

    pokw Member

    Joined:
    Jun 3, 2019
    Messages:
    48
    Likes Received:
    1
    I'm trying to see what's in the inventory of their held item, the shulker.
     
  4. Marc

    Marc Active Member

    Joined:
    Nov 27, 2020
    Messages:
    94
    Likes Received:
    0
    You cant rlly loop the inventory of the shulker if its in their hand. Or possibly not at all but you can edit use NBT Data
     
Thread Status:
Not open for further replies.

Share This Page

Loading...