Advertisement
Guest User

Untitled

a guest
Apr 24th, 2018
69
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.95 KB | None
  1. package me.goksi.extremevent;
  2.  
  3. import java.io.File;
  4. import java.util.List;
  5.  
  6. import org.bukkit.Bukkit;
  7. import org.bukkit.configuration.ConfigurationSection;
  8. import org.bukkit.plugin.java.JavaPlugin;
  9.  
  10. public class Main extends JavaPlugin {
  11.    
  12.     Commands cmd = new Commands(this);
  13.     Pvp pvp = new Pvp(cmd);
  14.     public static List<String> bc;
  15.    
  16.     public void onEnable() {
  17.         File file = new File(getDataFolder(), "config.yml");
  18.         if(!file.exists()){
  19.                 saveDefaultConfig();    
  20.         }
  21.         this.getCommand("pvp").setExecutor(pvp);
  22.         this.getCommand("pvpevent").setExecutor(cmd);
  23.         Bukkit.getPluginManager().registerEvents(pvp, this);
  24.     }
  25.    
  26.     public void onDisable() {
  27.         saveConfig();
  28.     }
  29.    
  30.     public static boolean loadCommands(final ConfigurationSection cs) {
  31.         if ((bc = (List<String>)cs.getStringList("BlockedCmd")) != null) {
  32.             return true;
  33.         }
  34.         return false;
  35.     }
  36.      public List<String> getBc() {
  37.             return bc;
  38.         }
  39.  
  40. }
Advertisement
RAW Paste Data Copied
Advertisement