G2A Many GEOs
SHARE
TWEET

Untitled

CMNTS Mar 31st, 2020 78 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package lv.cmnts.SkyPVPCore;
  2.  
  3. import lv.cmnts.SkyPVPCore.commands.StaffChatCommand;
  4. import lv.cmnts.SkyPVPCore.commands.StaffChatListCommand;
  5. import lv.cmnts.SkyPVPCore.events.AntiBypass;
  6. import lv.cmnts.SkyPVPCore.events.StaffChatEvent;
  7. import lv.cmnts.SkyPVPCore.events.WeatherEvent;
  8. import lv.cmnts.SkyPVPCore.placeholders.Season;
  9. import org.bukkit.Bukkit;
  10. import org.bukkit.ChatColor;
  11. import org.bukkit.entity.Player;
  12. import org.bukkit.event.HandlerList;
  13. import org.bukkit.plugin.java.JavaPlugin;
  14.  
  15. public class Core extends JavaPlugin {
  16.     public static Core instance;
  17.  
  18.     public String ConsolePrefix = getConfig().getString("console-prefix");
  19.     public String SkyPvPSeason = getConfig().getString("SkyPvPSeason");
  20.  
  21.     @Override
  22.     public void onEnable() {
  23.         ConsoleSend("Initializing plugin!");
  24.         ConsoleSend("");
  25.         ConsoleSend("Loading events!");
  26.         LoadEvents();
  27.         ConsoleSend("Loaded events!");
  28.         ConsoleSend("");
  29.         ConsoleSend("Loading placeholders!");
  30.         new Season(this).register();
  31.         ConsoleSend("Loaded placeholders!");
  32.         ConsoleSend("");
  33.         ConsoleSend("Loading configuration!");
  34.         this.saveDefaultConfig();
  35.         ConsoleSend("Loaded configuration!");
  36.         ConsoleSend("");
  37.         ConsoleSend("Plugin is up & running!");
  38.         ConsoleSend("Made by CMNTS! Discord: CMNTS#0295");
  39.         LoadCommands();
  40.     }
  41.  
  42.     @Override
  43.     public void onDisable() {
  44.         HandlerList.unregisterAll(instance);
  45.     }
  46.    
  47.     public void LoadEvents() {
  48.         Bukkit.getPluginManager().registerEvents(new WeatherEvent(this), this);
  49.         Bukkit.getPluginManager().registerEvents(new StaffChatEvent(this), this);
  50.         Bukkit.getPluginManager().registerEvents(new AntiBypass(this), this);
  51.     }
  52.  
  53.     public void LoadCommands() {
  54.         this.getCommand("sc").setExecutor(new StaffChatCommand(this));
  55.         this.getCommand("scl").setExecutor(new StaffChatListCommand(this));
  56.     }
  57.  
  58.     public void ConsoleSend(String msg) {
  59.         System.out.println(this.ConsolePrefix + msg);
  60.     }
  61.  
  62.     public void ConsoleC(String cmd) {
  63.         Bukkit.getServer().dispatchCommand(Bukkit.getConsoleSender(), cmd);
  64.     }
  65.  
  66.     public static void PlayerSend(Player p, String msg) {
  67.         p.sendMessage(ChatColor.translateAlternateColorCodes('&', msg));
  68.     }
  69. }
RAW Paste Data
Ledger Nano X - The secure hardware wallet
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top