mcMMO.java 22 KB

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