aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech/common/GT_PlayerActivityLogger.java
blob: 9526c21ddea4e0a7b0b483c3d1bf7524876502b3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
package gregtech.common;

import gregtech.GT_Mod;
import gregtech.api.util.GT_Log;
import java.io.PrintStream;
import java.util.ArrayList;

public class GT_PlayerActivityLogger
  implements Runnable
{
  public void run()
  {
    try
    {
      for (;;)
      {
        if (GT_Log.pal == null) {
          return;
        }
        ArrayList<String> tList = GT_Mod.gregtechproxy.mBufferedPlayerActivity;
        GT_Mod.gregtechproxy.mBufferedPlayerActivity = new ArrayList();
        String tLastOutput = "";
        int i = 0;
        for (int j = tList.size(); i < j; i++)
        {
          if (!tLastOutput.equals(tList.get(i))) {
            GT_Log.pal.println((String)tList.get(i));
          }
          tLastOutput = (String)tList.get(i);
        }
        Thread.sleep(10000L);
      }
    }
    catch (Throwable e) {}
  }
}