GT5-Unofficial/src/main/java/gregtech/common/GT_PlayerActivityLogger.java

32 lines
982 B
Java
Raw Normal View History

2015-06-23 22:29:05 +00:00
package gregtech.common;
import gregtech.GT_Mod;
import gregtech.api.util.GT_Log;
2015-10-22 02:06:25 +00:00
2015-06-23 22:29:05 +00:00
import java.util.ArrayList;
public class GT_PlayerActivityLogger
2015-10-22 02:06:25 +00:00
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) {
2015-06-23 22:29:05 +00:00
}
}
}