Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package ru.lymonmine.lsrvprefix;
- import org.bukkit.Bukkit;
- import org.bukkit.plugin.java.JavaPlugin;
- import ru.lymonmine.lsrvprefix.prefix_suffix_system.RunnablePrefix;
- import ru.lymonmine.lsrvprefix.util.modulevl.vaulthook;
- import ru.lymonmine.lsrvprefix.util.updater;
- import java.io.File;
- public class main extends JavaPlugin {
- public static main instance;
- public static vaulthook vaultHook;
- public void onEnable() {
- File config = new File(getDataFolder() + File.separator + "config.yml");
- if (!config.exists()) {
- getConfig().options().copyDefaults(true);
- saveDefaultConfig();
- }
- new updater(this, 98091).getVersion(version -> {
- if (this.getDescription().getVersion().equals(version)) {
- getLogger().info("There is not a new update available.");
- } else {
- getLogger().info("There is a new update available.");
- }
- });
- String modulevl = getConfig().getString("module-vl");
- if (!modulevl.equals("LuckPerms")) {
- vaultHook = new vaulthook();
- vaultHook.setupChat();
- }
- instance = this;
- //metric
- int pluginId = 13735;
- metrics metrics = new metrics(this, pluginId);
- //metric
- getCommand("lsprefix").setExecutor(new prefixcmd(this));
- Bukkit.getPluginManager().registerEvents(new invcolorprefix(this), this);
- try {
- RunnablePrefix.TagNameSystem();
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment