This is basically what is looks like and i cannot figure out how to remove the spaces... Thanks in advance for any help!
The message i sent was "test" but the message logged is "t e s t" everything the play sends is logged with spaces..
[PRIVATE CHAT LOG] Coords: [X: 3094 Y: 3497 H: 0] - Rights: [3] Username: [Username] - t e s t
Code:
public void writePMLog(String data)
{
//checkDateAndTime();
String filePath = "./Logs/Chat/Private/" + c.playerName + ".txt";
BufferedWriter bw = null;
try
{
bw = new BufferedWriter(new FileWriter(filePath, true));
bw.write("[PRIVATE CHAT LOG] Coords: [X: "+c.absX+" Y: "+c.absY+" H: "+c.heightLevel+"] -" + " Rights: [" + c.playerRights + "]" + " Username: [" + c.playerName +"] - " + "" + data + " ");
bw.newLine();
bw.flush();
}
catch (IOException ioe)
{
ioe.printStackTrace();
}
finally
{
if (bw != null)
{
try
{
bw.close();
}
catch (IOException ioe2)
{
}
}
}
}
c.getPA().writePMLog(Misc.textUnpack(pmchatText, packetSize-8));