Item Ids and Data From Config

Discussion in 'Plugin Development' started by chasechocolate, Dec 19, 2012.

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

    chasechocolate

    How would I set up my code so a user could specify the item id and item data with the following format?
    <itemid>:<itemdata>
    Any help appreciated!
     
  2. Offline

    chaseoes

    That's a bit harder because the : character is reserved by YAML. Example:
    Code:
    astring: string
    I usually use a different character. But you should be able to use String.split() then grab the parts you need as strings to further process them.
     
  3. Offline

    Sagacious_Zed Bukkit Docs

    reserved characters can still be used, however because they require escaping, lots of user error will probably occur.
     
  4. Offline

    chasechocolate

    Ok, thats what I thought...
     
  5. Offline

    gomeow

    Or they could be in quotes:
    Code:
    key: 'value1:value2'
     
Thread Status:
Not open for further replies.

Share This Page