Advertisement
Tom2565

Untitled

Oct 30th, 2017
13,726
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. package me.bildung.manager;
  2.  
  3. import java.io.File;
  4. import java.io.IOException;
  5. import org.bukkit.configuration.file.YamlConfiguration;
  6.  
  7. public class Filemanager
  8. {
  9. public static void dateiErstellen(File path, File file)
  10. {
  11. if (!path.exists()) {
  12. path.mkdir();
  13. }
  14. if (!file.exists()) {
  15. try {
  16. file.createNewFile();
  17. } catch (IOException localIOException) {}
  18. }
  19. }
  20.  
  21. public static void dateiSpeichern(File file, YamlConfiguration cfg) {
  22. try {
  23. cfg.save(file);
  24. }
  25. catch (IOException localIOException) {}
  26. }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement