Refactor maple leaf logging
Not even sure anyone is using this system. Keeping it around just in case.
This commit is contained in:
@@ -1,25 +0,0 @@
|
||||
package tools;
|
||||
|
||||
import client.Character;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
|
||||
import static java.util.concurrent.TimeUnit.MINUTES;
|
||||
import static java.util.concurrent.TimeUnit.SECONDS;
|
||||
|
||||
public class LogHelper {
|
||||
|
||||
public static String getTimeString(long then) {
|
||||
long duration = System.currentTimeMillis() - then;
|
||||
int seconds = (int) (duration / SECONDS.toMillis(1)) % 60;
|
||||
int minutes = (int) ((duration / MINUTES.toMillis(1)) % 60);
|
||||
return minutes + " Minutes and " + seconds + " Seconds";
|
||||
}
|
||||
|
||||
public static void logLeaf(Character player, boolean gotPrize, String operation) {
|
||||
String timeStamp = new SimpleDateFormat("dd-MM-yyyy hh:mm:ss").format(new Date());
|
||||
String log = player.getName() + (gotPrize ? " used a maple leaf to buy " + operation : " redeemed " + operation + " VP for a leaf") + " - " + timeStamp;
|
||||
FilePrinter.print(FilePrinter.LOG_LEAF, log);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user