How to turn text into a usable alias

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

Ghostfish_

New Member
May 6, 2020
5
0
1
24
My question is how to turn text into a usable alias, is there a constructor for an alias?

ex:
set block at {_l} to stone #valid
set block at {_l} to "stone" #invalid
set block at {_l} to
upload_2020-6-8_12-13-41.png
#invalid


well, why I don't just input stone without ""
because when I put item into a list in a yml,
upload_2020-6-8_12-20-13.png
upload_2020-6-8_12-21-29.png

it turns to org.bukkit.inventory.ItemStack, and lose all its metadata. For instance, the colored glass will lose its color


instead, if I put text into that list in that yml, it reads the alias name of the block, which is like "yellow stained glass pane" #however, it is not valid to use text: set block at {_l} to "stone" is invalid

and I try to put skript block into that list
upload_2020-6-8_12-20-53.png
upload_2020-6-8_12-21-25.png

, it reads:
upload_2020-6-8_12-16-57.png

in yml
and
upload_2020-6-8_12-17-27.png
in-game after I print it out by skript

So is there a way to just read the text in yml, and turns it into usable alias? Something like this:
set block at {_l} to block("stone") is equivalent to set block at {_l} to stone

Thank you very much
 

Attachments

  • upload_2020-6-8_12-17-14.png
    upload_2020-6-8_12-17-14.png
    7.1 KB · Views: 122
  • upload_2020-6-8_12-20-1.png
    upload_2020-6-8_12-20-1.png
    2 KB · Views: 116
Status
Not open for further replies.