Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class ConfigManager
- {
- private ServerManager SM = ServerManager.getPlugin(ServerManager.class);
- private Player P;
- File F = new File(SM.getDataFolder() + "/users/", P.getUniqueId().toString() + ".yml");
- FileConfiguration FC = YamlConfiguration.loadConfiguration(F);
- public void Setup(Player P)
- {
- this.P = P;
- if(!(F.exists()))
- {
- try
- {
- F.createNewFile();
- }
- catch (IOException IOE)
- {
- IOE.printStackTrace();
- }
- }
- FC = YamlConfiguration.loadConfiguration(F);
- FC.set("NAME", P.getName());
- try
- {
- FC.save(F);
- }
- catch (IOException IOE)
- {
- IOE.printStackTrace();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement