mirror of
https://github.com/SimplexDevelopment/FeelingLucky.git
synced 2025-07-05 03:26:42 +00:00
Alpha 1.0 RC02
Changelog: - Some visibility changes (Developers) - Added the Luck command. - Added some extra backend shortcuts
This commit is contained in:
@ -11,7 +11,7 @@ import java.io.File;
|
||||
import java.io.FileWriter;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
|
||||
public class PlayerConfig extends YamlConfiguration {
|
||||
public class PlayerConfig {
|
||||
private final File configFile;
|
||||
private volatile YamlConfiguration config;
|
||||
|
||||
@ -38,7 +38,7 @@ public class PlayerConfig extends YamlConfiguration {
|
||||
});
|
||||
}
|
||||
configFile = file;
|
||||
config = loadConfiguration(configFile);
|
||||
config = YamlConfiguration.loadConfiguration(configFile);
|
||||
|
||||
String tempUsername = config.getString("username");
|
||||
|
||||
@ -52,7 +52,7 @@ public class PlayerConfig extends YamlConfiguration {
|
||||
|
||||
protected PlayerConfig(File file) {
|
||||
this.configFile = file;
|
||||
config = loadConfiguration(configFile);
|
||||
config = YamlConfiguration.loadConfiguration(configFile);
|
||||
}
|
||||
|
||||
@Contract("_ -> new")
|
||||
@ -65,7 +65,13 @@ public class PlayerConfig extends YamlConfiguration {
|
||||
}
|
||||
|
||||
public void load() {
|
||||
SneakyWorker.sneakyTry(() -> config = loadConfiguration(configFile));
|
||||
|
||||
SneakyWorker.sneakyTry(() -> config = YamlConfiguration.loadConfiguration(configFile));
|
||||
}
|
||||
|
||||
public void setLuck(double luck) {
|
||||
config.set("luck", luck);
|
||||
save();
|
||||
}
|
||||
|
||||
public YamlConfiguration getConfig() {
|
||||
|
Reference in New Issue
Block a user