checking if player has plot.

Discussion in 'Plugin Development' started by shawshark, Jan 30, 2014.

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

    ZachBora

  2. Offline

    CraftBang

    @ZachBora


    My i :

    I use this
    Code:
     
    addComment(comment1, ps, 0);
    addComment(comment2, ps, 1);
    
    The comments:
    Code:
    final String comment1[] = {"Coins","0"};
    ps.comments.add(0, comment1);
     
    final String comment2[] = {"Gold","0"};
    ps.comments.add(1, comment2);
    
    I thought the DB started counting from 1 right? not from 0 I thought (please correct me if I'm wrong)

    But what if I wanted to edit the first comment, would I need to delete the first comment, than add one again? (i = 0+1 (+1 from the function setComment)
    Or just add it on the i=0 (so in the end it's 0+1 = 1) and it'll be overwritten?
     
  3. Offline

    ZachBora

    Right now it starts with 1 for first comment.
    You should be able to get the correct id if you check the position of the comment you want to delete in the comment list.
    I never did implement a way to delete comments, but that will be in the new api.
     
  4. Offline

    CraftBang

    ZachBora oh okay, I didn't really want to delete a comment just modify one.
    So I'll test somethings out, like not removing the comment, but just "add" it on the same line (So I hope it will be overwritten)
     
  5. Offline

    ZachBora

Thread Status:
Not open for further replies.

Share This Page