Advertisement
Guest User

Untitled

a guest
Feb 24th, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.49 KB | None | 0 0
  1. package fr.xenos5077.chunkclaim;
  2.  
  3. import fr.xenos5077.chunkclaim.commandes.*;
  4. import fr.xenos5077.chunkclaim.listeners.PlaceBreak;
  5. import fr.xenos5077.chunkclaim.utils.API;
  6. import fr.xenos5077.chunkclaim.utils.APITrust;
  7. import org.bukkit.Bukkit;
  8. import org.bukkit.plugin.PluginManager;
  9. import org.bukkit.plugin.java.JavaPlugin;
  10.  
  11. import java.io.File;
  12.  
  13. public class Main extends JavaPlugin {
  14.  
  15.     private static Main instance;
  16.     public static Main getInstance() {
  17.         return instance;
  18.     }
  19.  
  20.     API api;
  21.     APITrust apiTrust;
  22.     PluginManager pluginManager;
  23.  
  24.     public void onEnable() {
  25.         instance = this;
  26.  
  27.         if(!getDataFolder().exists()){
  28.             getDataFolder().mkdirs();
  29.         }
  30.         File file = new File(getDataFolder(), "fr.yml");
  31.         if(!file.exists()){
  32.             saveResource("fr.yml", false);
  33.         getCommand("ici").setExecutor(new Ici());
  34.         getCommand("iciadd").setExecutor(new Iciadd(this));
  35.         getCommand("iciremove").setExecutor(new Iciremove(this));
  36.         getCommand("iciclaim").setExecutor(new Iciclaim(this));
  37.         getCommand("iciunclaim").setExecutor(new Iciunclaim(this));
  38.         getCommand("icibypass").setExecutor(new Icibypass(this));
  39.  
  40.         this.pluginManager = Bukkit.getServer().getPluginManager();
  41.  
  42.         this.pluginManager.registerEvents(new PlaceBreak(this), this);
  43.  
  44.         this.api = new API(this);
  45.         this.apiTrust = new APITrust(this);
  46.  
  47.         saveDefaultConfig();
  48.     }
  49.     }
  50. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement