danik159

Untitled

Oct 8th, 2019
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.84 KB | None | 0 0
  1. package com.chickenstyle.naruto;
  2.  
  3. import java.io.File;
  4. import java.io.IOException;
  5. import java.util.ArrayList;
  6. import java.util.List;
  7.  
  8. import org.bukkit.configuration.file.YamlConfiguration;
  9.  
  10. public class Clans {
  11.  
  12. private static File file;
  13. private static YamlConfiguration config;
  14. static List<String> list = new ArrayList<>();
  15. public Clans(Main main) {
  16. list.add("Hello");
  17. list.add("why are you gay?");
  18. file = new File(main.getDataFolder(), "Clans.yml");
  19. if (!file.exists()) {
  20. try {
  21. file.createNewFile();
  22. } catch (IOException e) {
  23. e.printStackTrace();
  24. }
  25. }
  26. config = YamlConfiguration.loadConfiguration(file);
  27. config.set("Uchiha", list);
  28. config.set("Uzumaki", list);
  29.  
  30. }
  31.  
  32. public static List<?> getMembers(String clan) {
  33. return config.getList(clan);
  34. }
  35.  
  36. }
Advertisement
Add Comment
Please, Sign In to add comment