String to item type

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

Status
Not open for further replies.

daknus

Member
Jan 17, 2018
3
0
0
Hello,

I am trying to make barrels/storage drawers in Skript. For those of you who don't know, storage drawers is a mod that allows for storing large amounts of a single item type in a block. I don't know how to store the item type though, this is what I've got so far:

https://pastebin.com/uEzn9RuZ

To create a barrel you need to place a sign and type in [Barrel] in the first line. Then you have to right-click it with the desired item type. I want the behavior to be the same as in normal drawers - right-click to store a stack, left-click to retrieve one item, shift+left-click to retrieve a stack. I can't figure out how to convert the stored string to an item type to take from the player's inventory.
 
Yeah, just parse it as an item/material. Parsing is how you convert a string into another type.
 
Status
Not open for further replies.