Cteate a txt file and write text to it (Logg)

Discussion in 'Plugin Development' started by 8803286, Feb 14, 2012.

Thread Status:
Not open for further replies.
  1. Hi i create the code and now i want like

    if i place a block then "88003286 placed a block" in the Log

    from blocklistener



    MAIN CLASS FILE
    public void onEnable() {
    BlockBreakeLog();
    }

    public boolean BlockBreakeLog()
    {
    File file = new File(getDataFolder().getPath());
    if(!file.exists())file.mkdir();
    File config = new File(file.getPath() + File.separator + "BlockBreakeLog.txt");
    try
    {
    if(!config.exists())
    {
    FileOutputStream BlockBreakeLog = new FileOutputStream(config);
    BlockBreakeLog.flush();
    BlockBreakeLog.close();
    }
    return true;
    }
    catch(IOException ioe)
    {
    return false;
    }
    }
     
  2. Offline

    obnoxint

  3. I don't get it
     
  4. What don't you get. Do you not understand the source code I linked you to?
     
  5. Offline

    yucww210

    very good up you[​IMG]
     
  6. Offline

    orange451

  7. Offline

    Don Redhorse

Thread Status:
Not open for further replies.

Share This Page