mirror of
https://github.com/ChestShop-authors/ChestShop-3.git
synced 2024-11-28 13:05:11 +01:00
f1ee558e3a
- Switched from YamlConfiguration to BreezeConfiguration (from ChestShop 4) - Fixed getDouble() - Instead of checking for Admin Shops, we just pass in a new AdminShop Container - Created events for shop creation, protection checks and protection creation - Expanded string data value parsing, for example - you can use "Ocelot Monster" on the sign - Collected all external plugin wrappers in a single folder - Instead of using statics, now we use objects - Fixed enchantments for armour - Made config more readable - Added a setting for removing empty shops - Switched from System.out to logger - Also, switched from ugly file logging to Java's native one (FileHandler) - Added an option to tax transactions even when SERVER_ECONOMY_ACCOUNT is empty - Changed the Container interface
26 lines
615 B
Java
26 lines
615 B
Java
package com.Acrobot.ChestShop.Logging;
|
|
|
|
import java.text.DateFormat;
|
|
import java.text.SimpleDateFormat;
|
|
import java.util.Date;
|
|
import java.util.logging.Formatter;
|
|
import java.util.logging.LogRecord;
|
|
|
|
/**
|
|
* @author Acrobot
|
|
*/
|
|
public class FileFormatter extends Formatter {
|
|
private final DateFormat dateFormat = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");
|
|
|
|
@Override
|
|
public String format(LogRecord record) {
|
|
return getDateAndTime() + ' ' + record.getMessage() + '\n';
|
|
}
|
|
|
|
private String getDateAndTime() {
|
|
Date date = new Date();
|
|
|
|
return dateFormat.format(date);
|
|
}
|
|
}
|