Solved Hide Flags

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

Zak_Not_Zach

New Member
Jul 6, 2022
6
0
1
17
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.
 
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" 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
 
Last edited:
  • Like
Reactions: Zak_Not_Zach
127 hides all the flags, this includes the hex color of a leather armor piece below the name
you can also do
Code:
%itemtype% with all flags hidden named "SkUnity Pickaxe"
 
  • Like
Reactions: Zak_Not_Zach
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" 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
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
[doublepost=1657275157,1657275030][/doublepost]
127 hides all the flags, this includes the hex color of a leather armor piece below the name
you can also do
Code:
%itemtype% with all flags hidden named "SkUnity Pickaxe"
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
 
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.
[doublepost=1657397244,1657352231][/doublepost]
are you aware that there's no gui open effect?
send your code when possible, i'll help based on that

Hey Uh I installed SkBee and now it works I did the "with all flags hidden" thing Thanks!
 
Status
Not open for further replies.