Save ingame chat logs code

Posts 1–3 of 3 · Page 1 of 1
Save ingame chat logs code
I wrote this real fast, give credits if you use

Basically it saves chat logs of all ingame messages, so if u wanted to view something and it disappeared just go to the text file and search for it

Its useful in some way IMO
Code:
/*written by iolaka but not tested yet :D idea from flipyblitz*/
package net.minecraft.src;

import java.io.*;
import net.minecraft.client.Minecraft;

public classname(Minecraft minecraft, File file)
{
chatlogs = new File(file, "chatlogs.txt" /* + ".exevirus" loljk*/);
}

public void saveOptions()
    {
  try
  {
    PrintWriter printwriter = new PrintWriter(new FileWriter(chatlogs));
    printwriter.println((new StringBuilder()).append("Message logs:").append(ChatLine.message).toString()); // if chatline.message doesn't work, find the correct variable/where chat messages are stored, and apply it to this.
    printwriter.close();
  }
  catch(Exception exception)
  {
	    if(error)
    System.out.println("unable to save logs, error.");
    exception.printStackTrace();
  }
	// booleans
	public boolean error= true;
	public File chatlogs;
    }
Could you explain how this works?

And it clearly says : "written by iolaka"
Quote Originally Posted by iMexi View Post
Could you explain how this works?

And it clearly says : "written by iolaka"
i am iolaka , john404 is my other alias
Posts 1–3 of 3 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Need help?