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.

Add nbt without skstuff

Discussion in 'Skript' started by Hackusater, Nov 28, 2017.

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

    Hackusater Active Member

    Joined:
    Aug 5, 2017
    Messages:
    74
    Likes Received:
    2
    Hello, I am wondering if there is a way to add an nbt to an armorstand without using skstuff. (I am not looking for the console to send a command I am just wondering if it is possible without skstuff. If not then I will mark the thread as solved) Example:
    Code (Skript):
    1. add "{Invulnerable:1b}" to nbt of last spawned armor stand
     
  2. Wynnevir

    Wynnevir Well-Known Member

    Joined:
    Jul 9, 2017
    Messages:
    1,016
    Likes Received:
    62
    I'm like 84% sure skript mirror could do it(it seems to do everything just about), but that's java and is way above my level currentlyx3
     
  3. Mr_Simba

    Mr_Simba King of the Pridelands
    Moderator Supporter

    Joined:
    Dec 9, 2016
    Messages:
    257
    Likes Received:
    55
    Medals:
    There are often different ways to do this, e.g. as Wynnevir said you could use skript-mirror to access the Bukkit API to set an entity's invulnerability, but if you specifically mean a way to merge an NBT string with an entity's NBT, no, there isn't a way without SkStuff as far as I know. Why would people even use SkStuff if you didn't need it to work with NBT?
     
  4. Hackusater

    Hackusater Active Member

    Joined:
    Aug 5, 2017
    Messages:
    74
    Likes Received:
    2
    Okay hopefully someone can tell me how to do it using skript mirror.
     
  5. St0medy

    St0medy Member

    Joined:
    Nov 26, 2017
    Messages:
    18
    Likes Received:
    1
    But this armorstand have name?
     
  6. Hackusater

    Hackusater Active Member

    Joined:
    Aug 5, 2017
    Messages:
    74
    Likes Received:
    2
    Hm? Why would it matter if the armor stand was named or not? Anyways an NBT would be able to add a name etc.
     
  7. St0medy

    St0medy Member

    Joined:
    Nov 26, 2017
    Messages:
    18
    Likes Received:
    1
  8. Hackusater

    Hackusater Active Member

    Joined:
    Aug 5, 2017
    Messages:
    74
    Likes Received:
    2
  9. St0medy

    St0medy Member

    Joined:
    Nov 26, 2017
    Messages:
    18
    Likes Received:
    1
    For this yes.
     
  10. Donut

    Donut Well-Known Member

    Joined:
    Mar 27, 2017
    Messages:
    1,340
    Likes Received:
    176
    Medals:
    You dont need nbt to set an armorstand's invulnerability
    Code (Java):
    1. armorStand.setInvulnerable(true);
    this is java but shouldnt be too hard to convert to skript-mirror
     
    • Like Like x 1
  11. St0medy

    St0medy Member

    Joined:
    Nov 26, 2017
    Messages:
    18
    Likes Received:
    1
    Yes but, in java do that is simple but in sk turn it no

    It is not as simple as it seems
     
  12. Hackusater

    Hackusater Active Member

    Joined:
    Aug 5, 2017
    Messages:
    74
    Likes Received:
    2
    Well. I was using invulnerable as an example. I want to be able to do a lot of things (arms, name, equipped armor, position, etc) I just thought if I knew how to change the NBT I would be able to change all of these.


    It is simple in sk mirror because it handles java not just english.
     
    #12 Hackusater, Nov 29, 2017
    Last edited: Nov 29, 2017
  13. Donut

    Donut Well-Known Member

    Joined:
    Mar 27, 2017
    Messages:
    1,340
    Likes Received:
    176
    Medals:
    you can do all of that with skript-mirror without nbt. this might help with the arms part https://forums.skunity.com/threads/about-armorstand.5794/#post-23297
     
  14. Hackusater

    Hackusater Active Member

    Joined:
    Aug 5, 2017
    Messages:
    74
    Likes Received:
    2
  15. Donut

    Donut Well-Known Member

    Joined:
    Mar 27, 2017
    Messages:
    1,340
    Likes Received:
    176
    Medals:
    Of course theres a way but i highly recommend just using the armorstand's builtin methods to do it for you since nbt needs nms (which isnt a huge deal but makes your code version dependent). if youre gonna use nbt, i dont understand why youre not just using skstuff.
     
  16. Snow-Pyon

    Moderator Resource Staff

    Joined:
    Jan 25, 2017
    Messages:
    1,236
    Likes Received:
    176
    Medals:
    I'm gonna make an API for editing NBT with skript-mirror, just wait for it.
     
Thread Status:
Not open for further replies.

Share This Page

Loading...