Saving Values

Discussion in 'Plugin Development' started by TheDirtyDan, Jun 1, 2012.

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

    TheDirtyDan

    I always wanted to do this, but never quite under stood how something like this works. If I type a command, lets say /addone, it will add a number 1 for every command I use, and it adds up. If I do /check, I can then check to see how many times I have typed /addone. I don't know if you use a config file nor do I know if you use a flat database file (which I don't even know what that is).
     
  2. Offline

    RobotA69

    int i = 0;

    if(sender.typesCommand("/addone") {
    i++;
    } else if(sender.typesCommand("/addtwo) {
    for(int i; i < i + 2; i++) {
    sender.sendMessage("I EAT TURKAYS");
    }
    }

    if(sender.typesCommand("/check") {
    sender.sendMessage(String.parseStr(i));
    }
     
Thread Status:
Not open for further replies.

Share This Page