Probably messed things up.
This commit is contained in:
@@ -40,7 +40,10 @@ public class VaultManager {
|
||||
YamlConfiguration file = playerVaultFile(player.getName());
|
||||
System.out.println("serial: " + ser);
|
||||
// Prepare to save D:
|
||||
file.createSection("vault" + number);
|
||||
file.set("vault" + number + "", ser);
|
||||
saveFile(player.getName());
|
||||
Commands.inVault.remove(player.getName());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -97,4 +100,11 @@ public class VaultManager {
|
||||
YamlConfiguration playerFile = YamlConfiguration.loadConfiguration(file);
|
||||
return playerFile;
|
||||
}
|
||||
|
||||
public void saveFile(String name) throws IOException {
|
||||
File file = new File(directory + File.separator + name.toLowerCase() + ".yml");
|
||||
YamlConfiguration yaml = YamlConfiguration.loadConfiguration(file);
|
||||
yaml.save(file);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user