Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package me.lackoSK.bp;
- import lombok.Getter;
- import me.lackoSK.bp.Commands.AdminTeam;
- import me.lackoSK.bp.Commands.CommandManager;
- import me.lackoSK.bp.Commands.DonateCommand;
- import me.lackoSK.bp.chat.AntiSwearManager;
- import me.lackoSK.bp.config.ConfigManager;
- import me.lackoSK.bp.events.ProxyEvent;
- import me.lackoSK.bp.social.*;
- import me.lackoSK.bp.utils.Utils;
- import net.md_5.bungee.api.ProxyServer;
- import net.md_5.bungee.api.plugin.Plugin;
- public class BungeeMain extends Plugin {
- @Getter
- public static BungeeMain instance;
- public ConfigManager config;
- public AntiSwearManager asm;
- public CommandManager cmdm;
- @SuppressWarnings("unused")
- private ProxyEvent proxy;
- public long time;
- @Override
- public void onEnable() {
- instance = this;
- final Plugin pv = ProxyServer.getInstance().getPluginManager().getPlugin("PremiumVanish");
- final Plugin bs = ProxyServer.getInstance().getPluginManager().getPlugin("Bot-Sentry");
- if (pv != null) {
- Utils.log("&aSuccessfully hooked with &cPremiumVanish");
- } else {
- Utils.log("&cPlugin &f" + instance.getDescription().getName() + "&c wont't work because the &fPremiumVanish &cis not installed!");
- onDisable();
- return;
- }
- if (bs != null) {
- Utils.log("&aSuccessfully hooked with &cBotSentry");
- } else {
- Utils.log("&cPlugin &f" + instance.getDescription().getName() + "&c wont't work because the &fBotSentry &cis not installed!");
- onDisable();
- return;
- }
- Utils.log("&aA BungeeAPI by lackoSK version&f " + getDescription().getVersion());
- this.time = System.currentTimeMillis();
- this.config = new ConfigManager(this);
- this.asm = new AntiSwearManager(this);
- this.cmdm = new CommandManager(this);
- this.proxy = new ProxyEvent(this);
- getProxy().getPluginManager().registerCommand(this, new DonateCommand(this));
- getProxy().getPluginManager().registerCommand(this, new AdminTeam(this));
- getProxy().getPluginManager().registerListener(this, new AdminTeam(this));
- getProxy().getPluginManager().registerCommand(this, new AdminTeam.AdminTeamClear());
- getProxy().getPluginManager().registerCommand(this, new FaceBook(this));
- getProxy().getPluginManager().registerCommand(this, new Emotes(this));
- getProxy().getPluginManager().registerCommand(this, new Discord(this));
- getProxy().getPluginManager().registerCommand(this, new TeamSpeak(this));
- getProxy().getPluginManager().registerCommand(this, new Vote(this));
- getProxy().getPluginManager().registerCommand(this, new Trailer(this));
- }
- @Override
- public void onDisable() {
- Utils.log("&cPlugin was disabled.");
- instance = null;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement