config to command help

Discussion in 'Plugin Development' started by Laxer21117, Dec 21, 2014.

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

    Laxer21117

    Hi guys. I am stuck on an issue I am having with my warn plugin. So far I have my plugin so when a player gets warned by /warn it adds their name to a file with a number next to saying how many warns they have. How do I make it so when a command is typed like "/warn check <player>" then it will say the number that is in the config? Please tell me asap!
     
  2. Offline

    WesJD

  3. Offline

    Laxer21117

  4. Offline

    WesJD

  5. Offline

    mythbusterma

  6. Offline

    WesJD

    @mythbusterma I was assuming that he knew what to put in the quotation marks.
     
  7. Offline

    Laxer21117

    @mythbusterma Yea... I didn't work.. Can you atleast try to give me a better version of that? I am still a bit confused.
     
  8. Offline

    mythbusterma

    @Laxer21117

    Have a path that is warnings, then add a Player's name, like this:

    Code:
    getConfig().getInt("warnings." + Player#getName());
    Simple.
     
    Laxer21117 likes this.
Thread Status:
Not open for further replies.

Share This Page