Read and remove Data

Discussion in 'Plugin Development' started by MadeOke, Feb 13, 2013.

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

    MadeOke

    I Need help to read and write data
    lets say i have a data.txt like this:

    Code:
    21:1,2,3,4
    5:1,5,112,3
    122:20,21,1,1,1
    i want to check if number before the colon exist and spawn the item after the colon and then remove the entire line
    eg : /check 5 --> spawn item id : 1,5,112 and 3 and then remove 5:1,5,112,3 from data.txt
    so the data.txt now like this :
    Code:
    21:1,2,3,4
    122:20,21,1,1,1
    thanks for the help before :)
     
  2. Offline

    danthonywalker

    if(getConfig.isSet("if.A.value.Is.set.for.this.node"))
    {
    player.getInventory().addItem(getConfig().getInt("get.the.value.from.the.path"));
    getConfig().set("if.A.value.Is.set.for.this.node", null);
    }
     
  3. Offline

    MadeOke

    once more question, can i have 2 or more config? like plugin.yml and data.yml?
    and how?
     
  4. Offline

    danthonywalker

  5. Offline

    MadeOke

Thread Status:
Not open for further replies.

Share This Page