Guest User

Untitled

a guest
Mar 12th, 2022
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.60 KB | None | 0 0
  1. package ru.lymonmine.lsrvprefix;
  2.  
  3. import org.bukkit.Bukkit;
  4. import org.bukkit.plugin.java.JavaPlugin;
  5. import ru.lymonmine.lsrvprefix.prefix_suffix_system.RunnablePrefix;
  6. import ru.lymonmine.lsrvprefix.util.modulevl.vaulthook;
  7. import ru.lymonmine.lsrvprefix.util.updater;
  8.  
  9. import java.io.File;
  10.  
  11. public class main extends JavaPlugin {
  12. public static main instance;
  13. public static vaulthook vaultHook;
  14.  
  15. public void onEnable() {
  16. File config = new File(getDataFolder() + File.separator + "config.yml");
  17. if (!config.exists()) {
  18. getConfig().options().copyDefaults(true);
  19. saveDefaultConfig();
  20. }
  21. new updater(this, 98091).getVersion(version -> {
  22. if (this.getDescription().getVersion().equals(version)) {
  23. getLogger().info("There is not a new update available.");
  24. } else {
  25. getLogger().info("There is a new update available.");
  26. }
  27. });
  28. String modulevl = getConfig().getString("module-vl");
  29. if (!modulevl.equals("LuckPerms")) {
  30. vaultHook = new vaulthook();
  31. vaultHook.setupChat();
  32. }
  33. instance = this;
  34. //metric
  35. int pluginId = 13735;
  36. metrics metrics = new metrics(this, pluginId);
  37. //metric
  38. getCommand("lsprefix").setExecutor(new prefixcmd(this));
  39. Bukkit.getPluginManager().registerEvents(new invcolorprefix(this), this);
  40.  
  41. try {
  42. RunnablePrefix.TagNameSystem();
  43. } catch (Exception e) {
  44. e.printStackTrace();
  45. }
  46. }
  47. }
  48.  
  49.  
Advertisement
Add Comment
Please, Sign In to add comment