36 lines
714 B
Java
36 lines
714 B
Java
package cn.citycraft.LuckLottery.config;
|
|
|
|
import java.io.File;
|
|
import java.io.IOException;
|
|
|
|
import org.bukkit.plugin.Plugin;
|
|
|
|
public class PlayerDate extends ConfigLoader {
|
|
private static String CONFIG_NAME = "playerdate.yml";
|
|
private static FileConfig instance;
|
|
private static File file;
|
|
|
|
public PlayerDate(Plugin p) {
|
|
super(p, CONFIG_NAME, false);
|
|
file = new File(p.getDataFolder(), CONFIG_NAME);
|
|
instance = super.getInstance();
|
|
}
|
|
|
|
public static void load(Plugin p) {
|
|
new PlayerDate(p);
|
|
}
|
|
|
|
public static FileConfig getInstance() {
|
|
return instance;
|
|
}
|
|
|
|
public static void save() {
|
|
try {
|
|
instance.save(file);
|
|
} catch (IOException e) {
|
|
saveError(file);
|
|
e.printStackTrace();
|
|
}
|
|
}
|
|
}
|