Skip to content

Commit

Permalink
Update Version 1.3.5 AttributePlus.java
Browse files Browse the repository at this point in the history
  • Loading branch information
iNanmu authored Jan 23, 2020
1 parent 5116d20 commit c920504
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,22 @@ public class AttributePlus {

private static File file = new File(Main.getInstance().getDataFolder() + "/attribute.yml");
public static YamlConfiguration yaml;
private static Boolean hook = false;

public AttributePlus() {
if (!file.exists()) {
Main.getInstance().saveResource("attribute.yml", true);
}
yaml = YamlConfiguration.loadConfiguration(file);
hook = true;
}

/**
* 加载福气属性
* @param name 玩家名
*/
public static void loadAttribute(String name) {
if (yaml.getBoolean("Setting.enable")) {
if (hook && yaml.getBoolean("Setting.enable")) {
int dataValue = Main.getDatabase().getPlayerValue(name);
List<String> list = yaml.getStringList("Setting.list");
for (String str : list) {
Expand Down

0 comments on commit c920504

Please sign in to comment.