Advertisement
Guest User

Untitled

a guest
Aug 24th, 2019
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 2.67 KB | None | 0 0
  1. package me.lackoSK.bp;
  2.  
  3. import lombok.Getter;
  4. import me.lackoSK.bp.Commands.AdminTeam;
  5. import me.lackoSK.bp.Commands.CommandManager;
  6. import me.lackoSK.bp.Commands.DonateCommand;
  7. import me.lackoSK.bp.chat.AntiSwearManager;
  8. import me.lackoSK.bp.config.ConfigManager;
  9. import me.lackoSK.bp.events.ProxyEvent;
  10. import me.lackoSK.bp.social.*;
  11. import me.lackoSK.bp.utils.Utils;
  12. import net.md_5.bungee.api.ProxyServer;
  13. import net.md_5.bungee.api.plugin.Plugin;
  14.  
  15.  
  16. public class BungeeMain extends Plugin {
  17.  
  18.     @Getter
  19.     public static BungeeMain instance;
  20.  
  21.     public ConfigManager config;
  22.     public AntiSwearManager asm;
  23.     public CommandManager cmdm;
  24.     @SuppressWarnings("unused")
  25.     private ProxyEvent proxy;
  26.     public long time;
  27.  
  28.  
  29.     @Override
  30.     public void onEnable() {
  31.         instance = this;
  32.  
  33.         final Plugin pv = ProxyServer.getInstance().getPluginManager().getPlugin("PremiumVanish");
  34.         final Plugin bs = ProxyServer.getInstance().getPluginManager().getPlugin("Bot-Sentry");
  35.  
  36.  
  37.         if (pv != null) {
  38.  
  39.             Utils.log("&aSuccessfully hooked with &cPremiumVanish");
  40.  
  41.         } else {
  42.             Utils.log("&cPlugin &f" + instance.getDescription().getName() + "&c wont't work because the &fPremiumVanish &cis not installed!");
  43.  
  44.             onDisable();
  45.  
  46.             return;
  47.  
  48.         }
  49.  
  50.         if (bs != null) {
  51.  
  52.             Utils.log("&aSuccessfully hooked with &cBotSentry");
  53.  
  54.         } else {
  55.             Utils.log("&cPlugin &f" + instance.getDescription().getName() + "&c wont't work because the &fBotSentry &cis not installed!");
  56.  
  57.             onDisable();
  58.  
  59.             return;
  60.  
  61.         }
  62.  
  63.  
  64.  
  65.         Utils.log("&aA BungeeAPI by lackoSK version&f " + getDescription().getVersion());
  66.  
  67.         this.time = System.currentTimeMillis();
  68.         this.config = new ConfigManager(this);
  69.         this.asm = new AntiSwearManager(this);
  70.         this.cmdm = new CommandManager(this);
  71.         this.proxy = new ProxyEvent(this);
  72.  
  73.         getProxy().getPluginManager().registerCommand(this, new DonateCommand(this));
  74.         getProxy().getPluginManager().registerCommand(this, new AdminTeam(this));
  75.         getProxy().getPluginManager().registerListener(this, new AdminTeam(this));
  76.         getProxy().getPluginManager().registerCommand(this, new AdminTeam.AdminTeamClear());
  77.         getProxy().getPluginManager().registerCommand(this, new FaceBook(this));
  78.         getProxy().getPluginManager().registerCommand(this, new Emotes(this));
  79.         getProxy().getPluginManager().registerCommand(this, new Discord(this));
  80.         getProxy().getPluginManager().registerCommand(this, new TeamSpeak(this));
  81.         getProxy().getPluginManager().registerCommand(this, new Vote(this));
  82.         getProxy().getPluginManager().registerCommand(this, new Trailer(this));
  83.     }
  84.  
  85.     @Override
  86.     public void onDisable() {
  87.         Utils.log("&cPlugin was disabled.");
  88.  
  89.         instance = null;
  90.  
  91.     }
  92.  
  93.  
  94.  
  95. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement