NBT Tag transfer?

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

    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!

Jun 23, 2023
32
0
6
I have some items that use many nbt flags and these need to be mentioned in a skript but i dont know how to get their nbt tag and paste it into the skript
 
You cannot do this with regular skript. I can show you two plugins and the way you can do this with them, though.

skript-reflect:

Rich (BB code):
set {_item1} to wooden sword
set {_item2} to iron sword
set {_nbt} to {_item1}.getItemFlags()
{_item2}.addItemFlags({_nbt})

SkBee:

Code:
set {_item1} to wooden sword
set {_item2} to iron sword
set {_nbt} to nbt of {_item1}
set nbt of {_item2} to {_nbt}

SkBee is way easier, but I like skript-reflect more because once you learn how to use it there is way more features.

Lemme know if you have any issues.
 
Last edited:
  • Like
Reactions: BaeFell
When i set those variables to nbt tags, and then remove the code that converts item nbt tag to variable, will that variables that are already set before the wipe stay same?
 
Okay, to clarify, if you were you remove the last line in the code, everything else would still work. The last line was to give you an example of how to use it.