mcMMO.java 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600
  1. package com.gmail.nossr50;
  2. import com.gmail.nossr50.config.ConfigManager;
  3. import com.gmail.nossr50.config.CoreSkillsConfig;
  4. import com.gmail.nossr50.config.MainConfig;
  5. import com.gmail.nossr50.config.experience.ExperienceConfig;
  6. import com.gmail.nossr50.config.hocon.database.ConfigSectionCleaning;
  7. import com.gmail.nossr50.config.hocon.database.ConfigSectionMySQL;
  8. import com.gmail.nossr50.config.hocon.party.ConfigSectionPartyExperienceSharing;
  9. import com.gmail.nossr50.config.hocon.party.ConfigSectionPartyLevel;
  10. import com.gmail.nossr50.config.hocon.playerleveling.ConfigLeveling;
  11. import com.gmail.nossr50.config.hocon.scoreboard.ConfigScoreboard;
  12. import com.gmail.nossr50.core.DynamicSettingsManager;
  13. import com.gmail.nossr50.core.MetadataConstants;
  14. import com.gmail.nossr50.database.DatabaseManager;
  15. import com.gmail.nossr50.database.DatabaseManagerFactory;
  16. import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
  17. import com.gmail.nossr50.datatypes.skills.subskills.acrobatics.Roll;
  18. import com.gmail.nossr50.listeners.*;
  19. import com.gmail.nossr50.party.PartyManager;
  20. import com.gmail.nossr50.runnables.SaveTimerTask;
  21. import com.gmail.nossr50.runnables.backups.CleanBackupsTask;
  22. import com.gmail.nossr50.runnables.commands.NotifySquelchReminderTask;
  23. import com.gmail.nossr50.runnables.database.UserPurgeTask;
  24. import com.gmail.nossr50.runnables.party.PartyAutoKickTask;
  25. import com.gmail.nossr50.runnables.player.ClearRegisteredXPGainTask;
  26. import com.gmail.nossr50.runnables.player.PlayerProfileLoadingTask;
  27. import com.gmail.nossr50.runnables.player.PowerLevelUpdatingTask;
  28. import com.gmail.nossr50.runnables.skills.BleedTimerTask;
  29. import com.gmail.nossr50.skills.repair.repairables.RepairableManager;
  30. import com.gmail.nossr50.skills.salvage.salvageables.SalvageableManager;
  31. import com.gmail.nossr50.util.*;
  32. import com.gmail.nossr50.util.blockmeta.chunkmeta.ChunkManager;
  33. import com.gmail.nossr50.util.blockmeta.chunkmeta.ChunkManagerFactory;
  34. import com.gmail.nossr50.util.commands.CommandRegistrationManager;
  35. import com.gmail.nossr50.util.experience.FormulaManager;
  36. import com.gmail.nossr50.util.player.PlayerLevelUtils;
  37. import com.gmail.nossr50.util.player.UserManager;
  38. import com.gmail.nossr50.util.scoreboards.ScoreboardManager;
  39. import com.gmail.nossr50.util.skills.RankUtils;
  40. import com.gmail.nossr50.worldguard.WorldGuardManager;
  41. import net.shatteredlands.shatt.backup.ZipLibrary;
  42. import org.bstats.bukkit.Metrics;
  43. import org.bukkit.Bukkit;
  44. import org.bukkit.entity.Player;
  45. import org.bukkit.event.HandlerList;
  46. import org.bukkit.metadata.FixedMetadataValue;
  47. import org.bukkit.plugin.PluginManager;
  48. import org.bukkit.plugin.java.JavaPlugin;
  49. import java.io.File;
  50. import java.io.IOException;
  51. import java.lang.reflect.Method;
  52. public class mcMMO extends JavaPlugin {
  53. public static mcMMO p;
  54. // Jar Stuff
  55. public static File mcMMOFile;
  56. /* Managers */
  57. private static ChunkManager placeStore;
  58. private static ConfigManager configManager;
  59. private static DynamicSettingsManager dynamicSettingsManager;
  60. private static DatabaseManager databaseManager;
  61. private static FormulaManager formulaManager;
  62. private static MaterialMapStore materialMapStore;
  63. private static PlayerLevelUtils playerLevelUtils;
  64. /* File Paths */
  65. private static String mainDirectory;
  66. private static String localesDirectory;
  67. private static String flatFileDirectory;
  68. private static String usersFile;
  69. private static String modDirectory;
  70. /* Plugin Checks */
  71. private static boolean healthBarPluginEnabled;
  72. // API checks
  73. private static boolean serverAPIOutdated = false;
  74. // XP Event Check
  75. private boolean xpEventEnabled;
  76. /**
  77. * Things to be run when the plugin is enabled.
  78. */
  79. @Override
  80. public void onEnable() {
  81. try {
  82. p = this;
  83. getLogger().setFilter(new LogFilter(this));
  84. //DEBUG
  85. /*getLogger().info(Bukkit.getBukkitVersion());
  86. getLogger().info(Bukkit.getVersion());*/
  87. MetadataConstants.metadataValue = new FixedMetadataValue(this, true);
  88. PluginManager pluginManager = getServer().getPluginManager();
  89. healthBarPluginEnabled = pluginManager.getPlugin("HealthBar") != null;
  90. //upgradeManager = new UpgradeManager();
  91. setupFilePaths();
  92. //modManager = new ModManager();
  93. loadConfigFiles();
  94. registerDynamicSettings(); //Do this after configs are loaded
  95. if (healthBarPluginEnabled) {
  96. getLogger().info("HealthBar plugin found, mcMMO's healthbars are automatically disabled.");
  97. }
  98. if (pluginManager.getPlugin("NoCheatPlus") != null && pluginManager.getPlugin("CompatNoCheatPlus") == null) {
  99. getLogger().warning("NoCheatPlus plugin found, but CompatNoCheatPlus was not found!");
  100. getLogger().warning("mcMMO will not work properly alongside NoCheatPlus without CompatNoCheatPlus");
  101. }
  102. databaseManager = DatabaseManagerFactory.getDatabaseManager();
  103. //Check for the newer API and tell them what to do if its missing
  104. checkForOutdatedAPI();
  105. if (serverAPIOutdated) {
  106. Bukkit
  107. .getScheduler()
  108. .scheduleSyncRepeatingTask(this,
  109. () -> getLogger().severe("You are running an outdated version of " + getServerSoftware() + ", mcMMO will not work unless you update to a newer version!"),
  110. 20, 20 * 60 * 30);
  111. if (getServerSoftware() == ServerSoftwareType.CRAFTBUKKIT) {
  112. Bukkit.getScheduler()
  113. .scheduleSyncRepeatingTask(this,
  114. () -> getLogger().severe("We have detected you are using incompatible server software, our best guess is that you are using CraftBukkit. mcMMO requires Spigot or Paper, if you are not using CraftBukkit, you will still need to update your custom server software before mcMMO will work."),
  115. 20, 20 * 60 * 30);
  116. }
  117. } else {
  118. registerEvents();
  119. registerCoreSkills();
  120. registerCustomRecipes();
  121. if (getConfigManager().getConfigParty().isPartySystemEnabled())
  122. PartyManager.loadParties();
  123. formulaManager = new FormulaManager();
  124. for (Player player : getServer().getOnlinePlayers()) {
  125. new PlayerProfileLoadingTask(player).runTaskLaterAsynchronously(mcMMO.p, 1); // 1 Tick delay to ensure the player is marked as online before we begin loading
  126. }
  127. debug("Version " + getDescription().getVersion() + " is enabled!");
  128. scheduleTasks();
  129. CommandRegistrationManager.registerCommands();
  130. placeStore = ChunkManagerFactory.getChunkManager(); // Get our ChunkletManager
  131. if (mcMMO.getConfigManager().getConfigParty().getPTP().isPtpWorldBasedPermissions()) {
  132. Permissions.generateWorldTeleportPermissions();
  133. }
  134. //Populate Ranked Skill Maps (DO THIS LAST)
  135. RankUtils.populateRanks();
  136. }
  137. //If anonymous statistics are enabled then use them
  138. if (getConfigManager().getConfigMetrics().isAllowAnonymousUsageStatistics()) {
  139. Metrics metrics;
  140. metrics = new Metrics(this);
  141. metrics.addCustomChart(new Metrics.SimplePie("version", () -> getDescription().getVersion()));
  142. if (!configManager.getConfigLeveling().getConfigSectionLevelingGeneral().getConfigSectionLevelScaling().isRetroModeEnabled())
  143. metrics.addCustomChart(new Metrics.SimplePie("scaling", () -> "Standard"));
  144. else
  145. metrics.addCustomChart(new Metrics.SimplePie("scaling", () -> "Retro"));
  146. }
  147. } catch (Throwable t) {
  148. getLogger().severe("There was an error while enabling mcMMO!");
  149. t.printStackTrace();
  150. getLogger().severe("End of error report for mcMMO");
  151. getLogger().info("Please do not replace the mcMMO jar while the server is running.");
  152. }
  153. //Init Material Maps
  154. materialMapStore = new MaterialMapStore();
  155. //Init player level values
  156. playerLevelUtils = new PlayerLevelUtils();
  157. }
  158. @Override
  159. public void onLoad() {
  160. if (getServer().getPluginManager().getPlugin("WorldGuard") != null)
  161. WorldGuardManager.getInstance().registerFlags();
  162. }
  163. /**
  164. * Things to be run when the plugin is disabled.
  165. */
  166. @Override
  167. public void onDisable() {
  168. try {
  169. // Alchemy.finishAllBrews(); // Finish all partially complete AlchemyBrewTasks to prevent vanilla brewing continuation on restart
  170. UserManager.saveAll(); // Make sure to save player information if the server shuts down
  171. UserManager.clearAll();
  172. PartyManager.saveParties(); // Save our parties
  173. //TODO: Needed?
  174. if (mcMMO.getScoreboardSettings().getScoreboardsEnabled())
  175. ScoreboardManager.teardownAll();
  176. formulaManager.saveFormula();
  177. /*holidayManager.saveAnniversaryFiles();*/
  178. placeStore.saveAll(); // Save our metadata
  179. placeStore.cleanUp(); // Cleanup empty metadata stores
  180. } catch (NullPointerException e) {
  181. e.printStackTrace();
  182. }
  183. debug("Canceling all tasks...");
  184. getServer().getScheduler().cancelTasks(this); // This removes our tasks
  185. debug("Unregister all events...");
  186. HandlerList.unregisterAll(this); // Cancel event registrations
  187. if (mcMMO.getConfigManager().getConfigAutomatedBackups().isZipBackupsEnabled()) {
  188. // Remove other tasks BEFORE starting the Backup, or we just cancel it straight away.
  189. try {
  190. ZipLibrary.mcMMOBackup();
  191. } catch (IOException e) {
  192. getLogger().severe(e.toString());
  193. } catch (Throwable e) {
  194. if (e instanceof NoClassDefFoundError) {
  195. getLogger().severe("Backup class not found!");
  196. getLogger().info("Please do not replace the mcMMO jar while the server is running.");
  197. } else {
  198. getLogger().severe(e.toString());
  199. }
  200. }
  201. }
  202. databaseManager.onDisable();
  203. debug("Was disabled."); // How informative!
  204. }
  205. public static PlayerLevelUtils getPlayerLevelUtils() {
  206. return playerLevelUtils;
  207. }
  208. /**
  209. * Uses reflection to check for incompatible server software
  210. */
  211. private void checkForOutdatedAPI() {
  212. try {
  213. Class<?> checkForClass = Class.forName("org.bukkit.event.block.BlockDropItemEvent");
  214. Method newerAPIMethod = checkForClass.getMethod("getItems");
  215. Class<?> checkForClassBaseComponent = Class.forName("net.md_5.bungee.api.chat.BaseComponent");
  216. } catch (ClassNotFoundException | NoSuchMethodException e) {
  217. serverAPIOutdated = true;
  218. String software = getServerSoftwareStr();
  219. getLogger().severe("You are running an older version of " + software + " that is not compatible with mcMMO, update your server software!");
  220. }
  221. }
  222. /**
  223. * Returns a ServerSoftwareType based on version strings
  224. * Custom software is returned as CRAFTBUKKIT
  225. *
  226. * @return the ServerSoftwareType which likely matches the server
  227. */
  228. private ServerSoftwareType getServerSoftware() {
  229. if (Bukkit.getVersion().toLowerCase().contains("paper"))
  230. return ServerSoftwareType.PAPER;
  231. else if (Bukkit.getVersion().toLowerCase().contains("spigot"))
  232. return ServerSoftwareType.SPIGOT;
  233. else
  234. return ServerSoftwareType.CRAFTBUKKIT;
  235. }
  236. /**
  237. * Gets a string version of ServerSoftwareType
  238. *
  239. * @return Formatted String of ServerSoftwareType
  240. */
  241. private String getServerSoftwareStr() {
  242. switch (getServerSoftware()) {
  243. case PAPER:
  244. return "Paper";
  245. case SPIGOT:
  246. return "Spigot";
  247. default:
  248. return "CraftBukkit";
  249. }
  250. }
  251. public static MaterialMapStore getMaterialMapStore() {
  252. return materialMapStore;
  253. }
  254. public static String getMainDirectory() {
  255. return mainDirectory;
  256. }
  257. public static String getFlatFileDirectory() {
  258. return flatFileDirectory;
  259. }
  260. public static String getUsersFilePath() {
  261. return usersFile;
  262. }
  263. public static String getModDirectory() {
  264. return modDirectory;
  265. }
  266. public static FormulaManager getFormulaManager() {
  267. return formulaManager;
  268. }
  269. public static ChunkManager getPlaceStore() {
  270. return placeStore;
  271. }
  272. public static RepairableManager getRepairableManager() {
  273. return dynamicSettingsManager.getRepairableManager();
  274. }
  275. public static SalvageableManager getSalvageableManager() {
  276. return dynamicSettingsManager.getSalvageableManager();
  277. }
  278. public static DatabaseManager getDatabaseManager() {
  279. return databaseManager;
  280. }
  281. @Deprecated
  282. public static void setDatabaseManager(DatabaseManager databaseManager) {
  283. mcMMO.databaseManager = databaseManager;
  284. }
  285. /**
  286. * Returns settings for MySQL from the users config
  287. *
  288. * @return settings for MySQL from the users config
  289. */
  290. public static ConfigSectionMySQL getMySQLConfigSettings() {
  291. return configManager.getConfigDatabase().getConfigSectionMySQL();
  292. }
  293. /**
  294. * Returns settings for Player Leveling from the users config
  295. *
  296. * @return settings for Player Leveling from the users config
  297. */
  298. public static ConfigLeveling getPlayerLevelingSettings() {
  299. return configManager.getConfigLeveling();
  300. }
  301. /**
  302. * Returns settings for Database cleaning from the users config
  303. *
  304. * @return settings for Database cleaning from the users config
  305. */
  306. public static ConfigSectionCleaning getDatabaseCleaningSettings() {
  307. return configManager.getConfigDatabase().getConfigSectionCleaning();
  308. }
  309. /**
  310. * Returns settings for Party XP sharing from the users config
  311. *
  312. * @return settings for the Party XP sharing from the users config
  313. */
  314. public static ConfigSectionPartyExperienceSharing getPartyXPShareSettings() {
  315. return configManager.getConfigParty().getPartyXP().getPartyExperienceSharing();
  316. }
  317. /**
  318. * Returns settings for Party Leveling from the users config
  319. *
  320. * @return settings for the Party Leveling from the users config
  321. */
  322. public static ConfigSectionPartyLevel getPartyLevelSettings() {
  323. return configManager.getConfigParty().getPartyXP().getPartyLevel();
  324. }
  325. /**
  326. * Returns settings for Scoreboards from the users config
  327. *
  328. * @return settings for Scoreboards from the users config
  329. */
  330. public static ConfigScoreboard getScoreboardSettings() {
  331. return configManager.getConfigScoreboard();
  332. }
  333. /*public static HolidayManager getHolidayManager() {
  334. return holidayManager;
  335. }*/
  336. public static boolean isHealthBarPluginEnabled() {
  337. return healthBarPluginEnabled;
  338. }
  339. /**
  340. * Checks if this plugin is using retro mode
  341. * Retro mode is a 0-1000 skill system
  342. * Standard mode is scaled for 1-100
  343. *
  344. * @return true if retro mode is enabled
  345. */
  346. public static boolean isRetroModeEnabled() {
  347. return configManager.isRetroMode();
  348. }
  349. public static ConfigManager getConfigManager() {
  350. return configManager;
  351. }
  352. /**
  353. * The directory in which override locales are kept
  354. *
  355. * @return the override locale directory
  356. */
  357. public static String getLocalesDirectory() {
  358. return localesDirectory;
  359. }
  360. /**
  361. * If an XP rate event is currently in place
  362. *
  363. * @return
  364. */
  365. public boolean isXPEventEnabled() {
  366. return xpEventEnabled;
  367. }
  368. /*public static ModManager getModManager() {
  369. return modManager;
  370. }*/
  371. /*public static UpgradeManager getUpgradeManager() {
  372. return upgradeManager;
  373. }*/
  374. /**
  375. * Sets the xpEventEnabled boolean
  376. *
  377. * @param enabled the new boolean state
  378. */
  379. public void setXPEventEnabled(boolean enabled) {
  380. this.xpEventEnabled = enabled;
  381. }
  382. /**
  383. * Flips the XP events boolean
  384. */
  385. public void toggleXpEventEnabled() {
  386. xpEventEnabled = !xpEventEnabled;
  387. }
  388. /**
  389. * Debug helper method
  390. * Prefixes log entries with [Debug]
  391. *
  392. * @param message the message to log with a Debug prefix
  393. */
  394. public void debug(String message) {
  395. getLogger().info("[Debug] " + message);
  396. }
  397. /**
  398. * Setup the various storage file paths
  399. */
  400. private void setupFilePaths() {
  401. mcMMOFile = getFile();
  402. mainDirectory = getDataFolder().getPath() + File.separator;
  403. localesDirectory = mainDirectory + "locales" + File.separator;
  404. flatFileDirectory = mainDirectory + "flatfile" + File.separator;
  405. usersFile = flatFileDirectory + "mcmmo.users";
  406. modDirectory = mainDirectory + "mods" + File.separator;
  407. fixFilePaths();
  408. }
  409. private void fixFilePaths() {
  410. File oldFlatfilePath = new File(mainDirectory + "FlatFileStuff" + File.separator);
  411. if (oldFlatfilePath.exists()) {
  412. if (!oldFlatfilePath.renameTo(new File(flatFileDirectory))) {
  413. getLogger().warning("Failed to rename FlatFileStuff to flatfile!");
  414. }
  415. }
  416. File currentFlatfilePath = new File(flatFileDirectory);
  417. currentFlatfilePath.mkdirs();
  418. File localesDirectoryPath = new File(localesDirectory);
  419. localesDirectoryPath.mkdirs();
  420. }
  421. private void registerDynamicSettings() {
  422. dynamicSettingsManager = new DynamicSettingsManager();
  423. }
  424. private void loadConfigFiles() {
  425. configManager = new ConfigManager();
  426. configManager.loadConfigs();
  427. }
  428. private void registerEvents() {
  429. PluginManager pluginManager = getServer().getPluginManager();
  430. // Register events
  431. pluginManager.registerEvents(new PlayerListener(this), this);
  432. pluginManager.registerEvents(new BlockListener(this), this);
  433. pluginManager.registerEvents(new EntityListener(this), this);
  434. pluginManager.registerEvents(new InventoryListener(this), this);
  435. pluginManager.registerEvents(new SelfListener(this), this);
  436. pluginManager.registerEvents(new WorldListener(this), this);
  437. }
  438. /**
  439. * Registers core skills
  440. * This enables the skills in the new skill system
  441. */
  442. private void registerCoreSkills() {
  443. /*
  444. * Acrobatics skills
  445. */
  446. if (CoreSkillsConfig.getInstance().isPrimarySkillEnabled(PrimarySkillType.ACROBATICS)) {
  447. System.out.println("[mcMMO]" + " enabling Acrobatics Skills");
  448. //TODO: Should do this differently
  449. Roll roll = new Roll();
  450. CoreSkillsConfig.getInstance().isSkillEnabled(roll);
  451. InteractionManager.registerSubSkill(new Roll());
  452. }
  453. }
  454. private void registerCustomRecipes() {
  455. getServer().getScheduler().scheduleSyncDelayedTask(this, () -> {
  456. if (MainConfig.getInstance().getChimaeraEnabled()) {
  457. getServer().addRecipe(ChimaeraWing.getChimaeraWingRecipe());
  458. }
  459. }, 40);
  460. }
  461. private void scheduleTasks() {
  462. // Periodic save timer (Saves every 10 minutes by default)
  463. long saveIntervalTicks = Math.max(1200, (getConfigManager().getConfigDatabase().getConfigSectionDatabaseGeneral().getSaveIntervalMinutes() * (20 * 60)));
  464. new SaveTimerTask().runTaskTimer(this, saveIntervalTicks, saveIntervalTicks);
  465. // Cleanup the backups folder
  466. new CleanBackupsTask().runTaskAsynchronously(mcMMO.p);
  467. // Bleed timer (Runs every 0.5 seconds)
  468. new BleedTimerTask().runTaskTimer(this, Misc.TICK_CONVERSION_FACTOR, (Misc.TICK_CONVERSION_FACTOR / 2));
  469. // Old & Powerless User remover
  470. long purgeIntervalTicks = getConfigManager().getConfigDatabase().getConfigSectionCleaning().getPurgeInterval() * 60L * 60L * Misc.TICK_CONVERSION_FACTOR;
  471. if (mcMMO.getDatabaseCleaningSettings().isOnlyPurgeAtStartup()) {
  472. new UserPurgeTask().runTaskLaterAsynchronously(this, 2 * Misc.TICK_CONVERSION_FACTOR); // Start 2 seconds after startup.
  473. } else if (purgeIntervalTicks > 0) {
  474. new UserPurgeTask().runTaskTimerAsynchronously(this, purgeIntervalTicks, purgeIntervalTicks);
  475. }
  476. //Party System Stuff
  477. if (mcMMO.configManager.getConfigParty().isPartySystemEnabled()) {
  478. // Automatically remove old members from parties
  479. long kickIntervalTicks = getConfigManager().getConfigParty().getPartyCleanup().getPartyAutoKickHoursInterval() * 60L * 60L * Misc.TICK_CONVERSION_FACTOR;
  480. if (kickIntervalTicks == 0) {
  481. new PartyAutoKickTask().runTaskLater(this, 2 * Misc.TICK_CONVERSION_FACTOR); // Start 2 seconds after startup.
  482. } else if (kickIntervalTicks > 0) {
  483. new PartyAutoKickTask().runTaskTimer(this, kickIntervalTicks, kickIntervalTicks);
  484. }
  485. }
  486. // Update power level tag scoreboards
  487. new PowerLevelUpdatingTask().runTaskTimer(this, 2 * Misc.TICK_CONVERSION_FACTOR, 2 * Misc.TICK_CONVERSION_FACTOR);
  488. // Clear the registered XP data so players can earn XP again
  489. if (ExperienceConfig.getInstance().getDiminishedReturnsEnabled()) {
  490. new ClearRegisteredXPGainTask().runTaskTimer(this, 60, 60);
  491. }
  492. if (configManager.getConfigNotifications().getConfigNotificationGeneral().isPlayerTips()) {
  493. new NotifySquelchReminderTask().runTaskTimer(this, 60, ((20 * 60) * 60));
  494. }
  495. }
  496. public static DynamicSettingsManager getDynamicSettingsManager() {
  497. return dynamicSettingsManager;
  498. }
  499. private enum ServerSoftwareType {
  500. PAPER,
  501. SPIGOT,
  502. CRAFTBUKKIT
  503. }
  504. }