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 Hide Flags

Discussion in 'Skript' started by Zak_Not_Zach, Jul 6, 2022.

Tags:
Thread Status:
Not open for further replies.
  1. Zak_Not_Zach

    Zak_Not_Zach New Member

    Joined:
    Jul 6, 2022
    Messages:
    6
    Likes Received:
    0
    Skript Version 2.6
    Minecraft Server Version 1.17.1
    Issue: I need to be able to hide all possible flags from an item (Enchants, Attributes, Unbreakable, etc...) Which is in a gui

    My Code:
    on inventory click:
    if event-inventory = (metadata tag "recipegui" of player):
    cancel event
    if index of event-slot is 2:
    set metadata tag "recipegui2" of player to chest inventory with 5 rows named "&b&lSkUnity"
    set slot 22 of metadata tag "recipegui2" of player to stone pickaxe of efficiency 1 named "&fSkUnity Pickaxe"

    What Can I add to the set slot to make the flags hidden? I tried many solutions on different threads none worked.

     
  2. Best Answer:
    Post #6 by Zak_Not_Zach, Jul 9, 2022
  3. Dry Bonnoe

    Dry Bonnoe Member

    Joined:
    Jun 18, 2022
    Messages:
    13
    Likes Received:
    1
    Code (Text):
    1. on inventory click:
    2.     if event-inventory = (metadata tag "recipegui" of player):
    3.         cancel event
    4.         if index of event-slot is 2:
    5.             set metadata tag "recipegui2" of player to chest inventory with 5 rows named "&b&lSkUnity"
    6.             set slot 22 of metadata tag "recipegui2" of player to stone pickaxe of efficiency 1 named "&fSkUnity Pickaxe" with nbt "{Hideflags:63}"
    tell me if this code works

    also if you want to hide specific flags you have to add values this is to my knowledge the full list of values

    enchants: 1
    modifiers: 2
    unbreakable: 4
    candestroy: 8
    canplaceon: 16
    other(eg: potion effects): 32

    to get the value you want just add together all the tags you want to hide for example enchants, potion effects, and unbreakable would be 37
     
    #2 Dry Bonnoe, Jul 7, 2022
    Last edited: Jul 7, 2022
    • Like Like x 1
  4. JakeTheChad

    Supporter

    Joined:
    Jan 30, 2022
    Messages:
    99
    Likes Received:
    6
    127 hides all the flags, this includes the hex color of a leather armor piece below the name
    you can also do
    Code (Text):
    1. %itemtype% with all flags hidden named "SkUnity Pickaxe"
     
    • Like Like x 1
  5. Zak_Not_Zach

    Zak_Not_Zach New Member

    Joined:
    Jul 6, 2022
    Messages:
    6
    Likes Received:
    0
    If I add the | with nbt "{Hideflags:63}" | everything below this line of text stops working so the whole gui pretty much stops functioning thats why I am asking for help Cuz i tried tens of solutions none work, myabe its my server or smth
    --- Double Post Merged, Jul 8, 2022, Original Post Date: Jul 8, 2022 ---
    Is this what u meant?
    set slot 13 of metadata tag "recipegui" of player to stone of mending 1 with all flags hidden named "&atext"
    Cuz if it is didnt work too and the gui stopped functioning No errors or anything just everything stop functioning
     
  6. JakeTheChad

    Supporter

    Joined:
    Jan 30, 2022
    Messages:
    99
    Likes Received:
    6
    are you aware that there's no gui open effect?
    send your code when possible, i'll help based on that
     
    • Like Like x 1
  7. Zak_Not_Zach

    Zak_Not_Zach New Member

    Joined:
    Jul 6, 2022
    Messages:
    6
    Likes Received:
    0
    Alr Jake, Could u perhaps add me on discord (Zak_Not_Zach_2468) For a better conversation, if we manage to find a solution ill post it here thx for ur time btw.
    --- Double Post Merged, Jul 9, 2022, Original Post Date: Jul 9, 2022 ---
    Hey Uh I installed SkBee and now it works I did the "with all flags hidden" thing Thanks!
     
Thread Status:
Not open for further replies.

Share This Page

Loading...