MaxlHD

Main

Jan 26th, 2016
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.05 KB | None | 0 0
  1. package me.maxl.warp.main;
  2.  
  3. import java.io.File;
  4. import java.io.IOException;
  5.  
  6. import org.bukkit.configuration.file.FileConfiguration;
  7. import org.bukkit.configuration.file.YamlConfiguration;
  8. import org.bukkit.plugin.java.JavaPlugin;
  9.  
  10. import me.maxl.warp.commands.CMD_delWarp;
  11. import me.maxl.warp.commands.CMD_setWarp;
  12. import me.maxl.warp.commands.CMD_warp;
  13.  
  14. public class Warp extends JavaPlugin {
  15.  
  16. public File ordner = new File("plugins/Warpsystem");
  17. public File file = new File(ordner, "warps.yml");
  18. public FileConfiguration cfg = YamlConfiguration.loadConfiguration(file);
  19.  
  20. @Override
  21. public void onEnable() {
  22.  
  23. if(!file.exists()){
  24.  
  25. try {
  26. file.createNewFile();
  27. } catch (IOException e) {
  28. e.printStackTrace();
  29. }
  30.  
  31. }
  32.  
  33. if(!ordner.exists()){
  34.  
  35. ordner.mkdir();
  36.  
  37. }
  38.  
  39. getCommand("setWarp").setExecutor(new CMD_setWarp(this));
  40. getCommand("delWarp").setExecutor(new CMD_delWarp(this));
  41. getCommand("warp").setExecutor(new CMD_warp(this));
  42.  
  43. System.out.println("[Warp] geladen!");
  44.  
  45. }
  46.  
  47. }
Advertisement
Add Comment
Please, Sign In to add comment