48 lines
1.8 KiB
Java
48 lines
1.8 KiB
Java
package net.t2code.alias.Bungee;
|
|
|
|
import net.md_5.bungee.api.ProxyServer;
|
|
import net.md_5.bungee.api.plugin.Plugin;
|
|
import net.t2code.alias.Bungee.system.BLoad;
|
|
import net.t2code.alias.Util;
|
|
import net.t2code.lib.Bungee.Lib.messages.BT2CodeTemplate;
|
|
|
|
import java.util.logging.Level;
|
|
|
|
public final class BMain extends Plugin {
|
|
|
|
|
|
public static Plugin plugin;
|
|
public static String version;
|
|
public static String autor;
|
|
|
|
public static String prefix = Util.Prefix;
|
|
public static Integer spigotID = Util.SpigotID;
|
|
public static Integer bstatsID = Util.BstatsID;
|
|
public static String spigot = Util.Spigot;
|
|
public static String discord = Util.Discord;
|
|
|
|
|
|
@Override
|
|
public void onEnable() {
|
|
// Plugin startup logic
|
|
plugin = this;
|
|
version = plugin.getDescription().getVersion();
|
|
autor = plugin.getDescription().getAuthor();
|
|
if (ProxyServer.getInstance().getPluginManager().getPlugin("T2CodeLib") == null) {
|
|
plugin.getLogger().log(Level.SEVERE, "Plugin can not be loaded!");
|
|
ProxyServer.getInstance().getConsole().sendMessage(prefix + " §eT2CodeLib §4could not be found. Please download it here: " +
|
|
"§6https://www.spigotmc.org/resources/t2codelib.96388/ §4to be able to use this plugin.");
|
|
getProxy().getPluginManager().getPlugin(plugin.getDescription().getName()).onDisable();
|
|
return;
|
|
}
|
|
BLoad.onLoad(plugin, prefix, autor, version, spigot, discord, spigotID, bstatsID);
|
|
}
|
|
|
|
@Override
|
|
public void onDisable() {
|
|
// Plugin shutdown logic
|
|
if (ProxyServer.getInstance().getPluginManager().getPlugin("T2CodeLib") == null) return;
|
|
BT2CodeTemplate.onDisable(prefix, autor, version, spigot, discord);
|
|
}
|
|
}
|