Help at printing to a neat log/database.

Discussion in 'Plugin Development' started by MuisYa, Jul 24, 2011.

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

    MuisYa

    I would like some help from a almost proffesional plugin developer :3
    At least, a good one in a private discussion.

    I want some help with the following things:
    What my plugin (PistonAlert) does is this. It sends a message to a admin when a player places a piston. What my log does, is this: It prints that message to the log to.
    What i want is that it will be like this: If a player places a piston this must be printed to a file.
    Code:
    MuisYa : 1
    And when he places another piston
    Code:
    MuisYa : 2
    But i cant get it fixed.
    Please respond here, or send me a private message.
    Mailing is also possible, Thanks!
     
  2. Offline

    Hretsam

    I think i can help you with that.
    You can check my GitHub for some of this code.
    If you want to do it with flatfiles, you can use the Bukkit configuration classes to simply load and save variables.

    This can work:
    Code:
    config.setProperty(config.getInt(player.getName(), 0) + 1);
    config.save();
    
     
Thread Status:
Not open for further replies.

Share This Page