|
@@ -52,32 +52,9 @@ import java.io.IOException;
|
|
import java.lang.reflect.Method;
|
|
import java.lang.reflect.Method;
|
|
|
|
|
|
public class mcMMO extends JavaPlugin {
|
|
public class mcMMO extends JavaPlugin {
|
|
- /* Metadata Values */
|
|
|
|
- public static final String FISH_HOOK_REF_METAKEY = "mcMMO: Fish Hook Tracker";
|
|
|
|
- public static final String CUSTOM_DAMAGE_METAKEY = "mcMMO: Custom Damage";
|
|
|
|
- public final static String UNNATURAL_MOB_METAKEY = "mcMMO: Spawned Entity";
|
|
|
|
- public final static String PISTON_TRACKING_METAKEY = "mcMMO: Piston Tracking";
|
|
|
|
- public final static String FURNACE_TRACKING_METAKEY = "mcMMO: Tracked Furnace";
|
|
|
|
- public final static String TNT_TRACKING_METAKEY = "mcMMO: Tracked TNT";
|
|
|
|
- public final static String SPAWNED_FIREWORKS_METAKEY = "mcMMO: Funfetti";
|
|
|
|
- public final static String SAFE_TNT_METAKEY = "mcMMO: Safe TNT";
|
|
|
|
- public final static String CUSTOM_NAME_METAKEY = "mcMMO: Custom Name";
|
|
|
|
- public final static String NAME_VISIBILITY_METAKEY = "mcMMO: Name Visibility";
|
|
|
|
- public final static String DROPPED_ITEM_TRACKING_METAKEY = "mcMMO: Tracked Item";
|
|
|
|
- public final static String INFINITE_ARROW_METAKEY = "mcMMO: Infinite Arrow";
|
|
|
|
- public final static String BOW_FORCE_METAKEY = "mcMMO: Bow Force";
|
|
|
|
- public final static String ARROW_DISTANCE_METAKEY = "mcMMO: Arrow Distance";
|
|
|
|
- public final static String BONUS_DROPS_METAKEY = "mcMMO: Bonus Drops";
|
|
|
|
- //public final static String customDamageKey = "mcMMO: Custom Damage";
|
|
|
|
- public final static String DISARMED_ITEM_METAKEY = "mcMMO: Disarmed Item";
|
|
|
|
- public final static String PLAYER_DATA_METAKEY = "mcMMO: Player Data";
|
|
|
|
- public final static String GREEN_THUMB_METAKEY = "mcMMO: Green Thumb";
|
|
|
|
- public final static String DATABASE_PROCESSING_COMMAND_METAKEY = "mcMMO: Processing Database Command";
|
|
|
|
- public final static String BRED_ANIMAL_TRACKING_METAKEY = "mcMMO: Bred Animal";
|
|
|
|
-
|
|
|
|
public static mcMMO p;
|
|
public static mcMMO p;
|
|
// Jar Stuff
|
|
// Jar Stuff
|
|
- public static File mcmmo;
|
|
|
|
|
|
+ public static File mcMMOFile;
|
|
public static FixedMetadataValue metadataValue;
|
|
public static FixedMetadataValue metadataValue;
|
|
/* Managers */
|
|
/* Managers */
|
|
private static ChunkManager placeStore;
|
|
private static ChunkManager placeStore;
|
|
@@ -94,6 +71,7 @@ public class mcMMO extends JavaPlugin {
|
|
private static String flatFileDirectory;
|
|
private static String flatFileDirectory;
|
|
private static String usersFile;
|
|
private static String usersFile;
|
|
private static String modDirectory;
|
|
private static String modDirectory;
|
|
|
|
+
|
|
/* Plugin Checks */
|
|
/* Plugin Checks */
|
|
private static boolean healthBarPluginEnabled;
|
|
private static boolean healthBarPluginEnabled;
|
|
// API checks
|
|
// API checks
|
|
@@ -101,128 +79,6 @@ public class mcMMO extends JavaPlugin {
|
|
// XP Event Check
|
|
// XP Event Check
|
|
private boolean xpEventEnabled;
|
|
private boolean xpEventEnabled;
|
|
|
|
|
|
- public static MaterialMapStore getMaterialMapStore() {
|
|
|
|
- return materialMapStore;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- public static String getMainDirectory() {
|
|
|
|
- return mainDirectory;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- public static String getFlatFileDirectory() {
|
|
|
|
- return flatFileDirectory;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- public static String getUsersFilePath() {
|
|
|
|
- return usersFile;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- public static String getModDirectory() {
|
|
|
|
- return modDirectory;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- public static FormulaManager getFormulaManager() {
|
|
|
|
- return formulaManager;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- public static ChunkManager getPlaceStore() {
|
|
|
|
- return placeStore;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- public static RepairableManager getRepairableManager() {
|
|
|
|
- return dynamicSettingsManager.getRepairableManager();
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- public static SalvageableManager getSalvageableManager() {
|
|
|
|
- return dynamicSettingsManager.getSalvageableManager();
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- public static DatabaseManager getDatabaseManager() {
|
|
|
|
- return databaseManager;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- @Deprecated
|
|
|
|
- public static void setDatabaseManager(DatabaseManager databaseManager) {
|
|
|
|
- mcMMO.databaseManager = databaseManager;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- /**
|
|
|
|
- * Returns settings for MySQL from the users config
|
|
|
|
- *
|
|
|
|
- * @return settings for MySQL from the users config
|
|
|
|
- */
|
|
|
|
- public static ConfigSectionMySQL getMySQLConfigSettings() {
|
|
|
|
- return configManager.getConfigDatabase().getConfigSectionMySQL();
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- /**
|
|
|
|
- * Returns settings for Player Leveling from the users config
|
|
|
|
- *
|
|
|
|
- * @return settings for Player Leveling from the users config
|
|
|
|
- */
|
|
|
|
- public static ConfigLeveling getPlayerLevelingSettings() {
|
|
|
|
- return configManager.getConfigLeveling();
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- /**
|
|
|
|
- * Returns settings for Database cleaning from the users config
|
|
|
|
- *
|
|
|
|
- * @return settings for Database cleaning from the users config
|
|
|
|
- */
|
|
|
|
- public static ConfigSectionCleaning getDatabaseCleaningSettings() {
|
|
|
|
- return configManager.getConfigDatabase().getConfigSectionCleaning();
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- /**
|
|
|
|
- * Returns settings for Party XP sharing from the users config
|
|
|
|
- *
|
|
|
|
- * @return settings for the Party XP sharing from the users config
|
|
|
|
- */
|
|
|
|
- public static ConfigSectionPartyExperienceSharing getPartyXPShareSettings() {
|
|
|
|
- return configManager.getConfigParty().getPartyXP().getPartyExperienceSharing();
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- /**
|
|
|
|
- * Returns settings for Party Leveling from the users config
|
|
|
|
- *
|
|
|
|
- * @return settings for the Party Leveling from the users config
|
|
|
|
- */
|
|
|
|
- public static ConfigSectionPartyLevel getPartyLevelSettings() {
|
|
|
|
- return configManager.getConfigParty().getPartyXP().getPartyLevel();
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- /**
|
|
|
|
- * Returns settings for Scoreboards from the users config
|
|
|
|
- *
|
|
|
|
- * @return settings for Scoreboards from the users config
|
|
|
|
- */
|
|
|
|
- public static ConfigScoreboard getScoreboardSettings() {
|
|
|
|
- return configManager.getConfigScoreboard();
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- /*public static HolidayManager getHolidayManager() {
|
|
|
|
- return holidayManager;
|
|
|
|
- }*/
|
|
|
|
-
|
|
|
|
- public static boolean isHealthBarPluginEnabled() {
|
|
|
|
- return healthBarPluginEnabled;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- /**
|
|
|
|
- * Checks if this plugin is using retro mode
|
|
|
|
- * Retro mode is a 0-1000 skill system
|
|
|
|
- * Standard mode is scaled for 1-100
|
|
|
|
- *
|
|
|
|
- * @return true if retro mode is enabled
|
|
|
|
- */
|
|
|
|
- public static boolean isRetroModeEnabled() {
|
|
|
|
- return configManager.isRetroMode();
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- public static ConfigManager getConfigManager() {
|
|
|
|
- return configManager;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
/**
|
|
/**
|
|
* Things to be run when the plugin is enabled.
|
|
* Things to be run when the plugin is enabled.
|
|
*/
|
|
*/
|
|
@@ -331,6 +187,61 @@ public class mcMMO extends JavaPlugin {
|
|
playerLevelUtils = new PlayerLevelUtils();
|
|
playerLevelUtils = new PlayerLevelUtils();
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ @Override
|
|
|
|
+ public void onLoad() {
|
|
|
|
+ if (getServer().getPluginManager().getPlugin("WorldGuard") != null)
|
|
|
|
+ WorldGuardManager.getInstance().registerFlags();
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * Things to be run when the plugin is disabled.
|
|
|
|
+ */
|
|
|
|
+ @Override
|
|
|
|
+ public void onDisable() {
|
|
|
|
+ try {
|
|
|
|
+// Alchemy.finishAllBrews(); // Finish all partially complete AlchemyBrewTasks to prevent vanilla brewing continuation on restart
|
|
|
|
+ UserManager.saveAll(); // Make sure to save player information if the server shuts down
|
|
|
|
+ UserManager.clearAll();
|
|
|
|
+ PartyManager.saveParties(); // Save our parties
|
|
|
|
+
|
|
|
|
+ //TODO: Needed?
|
|
|
|
+ if (mcMMO.getScoreboardSettings().getScoreboardsEnabled())
|
|
|
|
+ ScoreboardManager.teardownAll();
|
|
|
|
+
|
|
|
|
+ formulaManager.saveFormula();
|
|
|
|
+ /*holidayManager.saveAnniversaryFiles();*/
|
|
|
|
+ placeStore.saveAll(); // Save our metadata
|
|
|
|
+ placeStore.cleanUp(); // Cleanup empty metadata stores
|
|
|
|
+ } catch (NullPointerException e) {
|
|
|
|
+ e.printStackTrace();
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ debug("Canceling all tasks...");
|
|
|
|
+ getServer().getScheduler().cancelTasks(this); // This removes our tasks
|
|
|
|
+ debug("Unregister all events...");
|
|
|
|
+ HandlerList.unregisterAll(this); // Cancel event registrations
|
|
|
|
+
|
|
|
|
+ if (mcMMO.getConfigManager().getConfigAutomatedBackups().isZipBackupsEnabled()) {
|
|
|
|
+ // Remove other tasks BEFORE starting the Backup, or we just cancel it straight away.
|
|
|
|
+ try {
|
|
|
|
+ ZipLibrary.mcMMOBackup();
|
|
|
|
+ } catch (IOException e) {
|
|
|
|
+ getLogger().severe(e.toString());
|
|
|
|
+ } catch (Throwable e) {
|
|
|
|
+ if (e instanceof NoClassDefFoundError) {
|
|
|
|
+ getLogger().severe("Backup class not found!");
|
|
|
|
+ getLogger().info("Please do not replace the mcMMO jar while the server is running.");
|
|
|
|
+ } else {
|
|
|
|
+ getLogger().severe(e.toString());
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ databaseManager.onDisable();
|
|
|
|
+
|
|
|
|
+ debug("Was disabled."); // How informative!
|
|
|
|
+ }
|
|
|
|
+
|
|
public static PlayerLevelUtils getPlayerLevelUtils() {
|
|
public static PlayerLevelUtils getPlayerLevelUtils() {
|
|
return playerLevelUtils;
|
|
return playerLevelUtils;
|
|
}
|
|
}
|
|
@@ -381,59 +292,126 @@ public class mcMMO extends JavaPlugin {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- @Override
|
|
|
|
- public void onLoad() {
|
|
|
|
- if (getServer().getPluginManager().getPlugin("WorldGuard") != null)
|
|
|
|
- WorldGuardManager.getInstance().registerFlags();
|
|
|
|
|
|
+ public static MaterialMapStore getMaterialMapStore() {
|
|
|
|
+ return materialMapStore;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ public static String getMainDirectory() {
|
|
|
|
+ return mainDirectory;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ public static String getFlatFileDirectory() {
|
|
|
|
+ return flatFileDirectory;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ public static String getUsersFilePath() {
|
|
|
|
+ return usersFile;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ public static String getModDirectory() {
|
|
|
|
+ return modDirectory;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ public static FormulaManager getFormulaManager() {
|
|
|
|
+ return formulaManager;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ public static ChunkManager getPlaceStore() {
|
|
|
|
+ return placeStore;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ public static RepairableManager getRepairableManager() {
|
|
|
|
+ return dynamicSettingsManager.getRepairableManager();
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ public static SalvageableManager getSalvageableManager() {
|
|
|
|
+ return dynamicSettingsManager.getSalvageableManager();
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ public static DatabaseManager getDatabaseManager() {
|
|
|
|
+ return databaseManager;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @Deprecated
|
|
|
|
+ public static void setDatabaseManager(DatabaseManager databaseManager) {
|
|
|
|
+ mcMMO.databaseManager = databaseManager;
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
- * Things to be run when the plugin is disabled.
|
|
|
|
|
|
+ * Returns settings for MySQL from the users config
|
|
|
|
+ *
|
|
|
|
+ * @return settings for MySQL from the users config
|
|
*/
|
|
*/
|
|
- @Override
|
|
|
|
- public void onDisable() {
|
|
|
|
- try {
|
|
|
|
-// Alchemy.finishAllBrews(); // Finish all partially complete AlchemyBrewTasks to prevent vanilla brewing continuation on restart
|
|
|
|
- UserManager.saveAll(); // Make sure to save player information if the server shuts down
|
|
|
|
- UserManager.clearAll();
|
|
|
|
- PartyManager.saveParties(); // Save our parties
|
|
|
|
|
|
+ public static ConfigSectionMySQL getMySQLConfigSettings() {
|
|
|
|
+ return configManager.getConfigDatabase().getConfigSectionMySQL();
|
|
|
|
+ }
|
|
|
|
|
|
- //TODO: Needed?
|
|
|
|
- if (mcMMO.getScoreboardSettings().getScoreboardsEnabled())
|
|
|
|
- ScoreboardManager.teardownAll();
|
|
|
|
|
|
+ /**
|
|
|
|
+ * Returns settings for Player Leveling from the users config
|
|
|
|
+ *
|
|
|
|
+ * @return settings for Player Leveling from the users config
|
|
|
|
+ */
|
|
|
|
+ public static ConfigLeveling getPlayerLevelingSettings() {
|
|
|
|
+ return configManager.getConfigLeveling();
|
|
|
|
+ }
|
|
|
|
|
|
- formulaManager.saveFormula();
|
|
|
|
- /*holidayManager.saveAnniversaryFiles();*/
|
|
|
|
- placeStore.saveAll(); // Save our metadata
|
|
|
|
- placeStore.cleanUp(); // Cleanup empty metadata stores
|
|
|
|
- } catch (NullPointerException e) {
|
|
|
|
- e.printStackTrace();
|
|
|
|
- }
|
|
|
|
|
|
+ /**
|
|
|
|
+ * Returns settings for Database cleaning from the users config
|
|
|
|
+ *
|
|
|
|
+ * @return settings for Database cleaning from the users config
|
|
|
|
+ */
|
|
|
|
+ public static ConfigSectionCleaning getDatabaseCleaningSettings() {
|
|
|
|
+ return configManager.getConfigDatabase().getConfigSectionCleaning();
|
|
|
|
+ }
|
|
|
|
|
|
- debug("Canceling all tasks...");
|
|
|
|
- getServer().getScheduler().cancelTasks(this); // This removes our tasks
|
|
|
|
- debug("Unregister all events...");
|
|
|
|
- HandlerList.unregisterAll(this); // Cancel event registrations
|
|
|
|
|
|
+ /**
|
|
|
|
+ * Returns settings for Party XP sharing from the users config
|
|
|
|
+ *
|
|
|
|
+ * @return settings for the Party XP sharing from the users config
|
|
|
|
+ */
|
|
|
|
+ public static ConfigSectionPartyExperienceSharing getPartyXPShareSettings() {
|
|
|
|
+ return configManager.getConfigParty().getPartyXP().getPartyExperienceSharing();
|
|
|
|
+ }
|
|
|
|
|
|
- if (mcMMO.getConfigManager().getConfigAutomatedBackups().isZipBackupsEnabled()) {
|
|
|
|
- // Remove other tasks BEFORE starting the Backup, or we just cancel it straight away.
|
|
|
|
- try {
|
|
|
|
- ZipLibrary.mcMMOBackup();
|
|
|
|
- } catch (IOException e) {
|
|
|
|
- getLogger().severe(e.toString());
|
|
|
|
- } catch (Throwable e) {
|
|
|
|
- if (e instanceof NoClassDefFoundError) {
|
|
|
|
- getLogger().severe("Backup class not found!");
|
|
|
|
- getLogger().info("Please do not replace the mcMMO jar while the server is running.");
|
|
|
|
- } else {
|
|
|
|
- getLogger().severe(e.toString());
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
|
|
+ /**
|
|
|
|
+ * Returns settings for Party Leveling from the users config
|
|
|
|
+ *
|
|
|
|
+ * @return settings for the Party Leveling from the users config
|
|
|
|
+ */
|
|
|
|
+ public static ConfigSectionPartyLevel getPartyLevelSettings() {
|
|
|
|
+ return configManager.getConfigParty().getPartyXP().getPartyLevel();
|
|
|
|
+ }
|
|
|
|
|
|
- databaseManager.onDisable();
|
|
|
|
|
|
+ /**
|
|
|
|
+ * Returns settings for Scoreboards from the users config
|
|
|
|
+ *
|
|
|
|
+ * @return settings for Scoreboards from the users config
|
|
|
|
+ */
|
|
|
|
+ public static ConfigScoreboard getScoreboardSettings() {
|
|
|
|
+ return configManager.getConfigScoreboard();
|
|
|
|
+ }
|
|
|
|
|
|
- debug("Was disabled."); // How informative!
|
|
|
|
|
|
+ /*public static HolidayManager getHolidayManager() {
|
|
|
|
+ return holidayManager;
|
|
|
|
+ }*/
|
|
|
|
+
|
|
|
|
+ public static boolean isHealthBarPluginEnabled() {
|
|
|
|
+ return healthBarPluginEnabled;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * Checks if this plugin is using retro mode
|
|
|
|
+ * Retro mode is a 0-1000 skill system
|
|
|
|
+ * Standard mode is scaled for 1-100
|
|
|
|
+ *
|
|
|
|
+ * @return true if retro mode is enabled
|
|
|
|
+ */
|
|
|
|
+ public static boolean isRetroModeEnabled() {
|
|
|
|
+ return configManager.isRetroMode();
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ public static ConfigManager getConfigManager() {
|
|
|
|
+ return configManager;
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -492,7 +470,7 @@ public class mcMMO extends JavaPlugin {
|
|
* Setup the various storage file paths
|
|
* Setup the various storage file paths
|
|
*/
|
|
*/
|
|
private void setupFilePaths() {
|
|
private void setupFilePaths() {
|
|
- mcmmo = getFile();
|
|
|
|
|
|
+ mcMMOFile = getFile();
|
|
mainDirectory = getDataFolder().getPath() + File.separator;
|
|
mainDirectory = getDataFolder().getPath() + File.separator;
|
|
localesDirectory = mainDirectory + "locales" + File.separator;
|
|
localesDirectory = mainDirectory + "locales" + File.separator;
|
|
flatFileDirectory = mainDirectory + "flatfile" + File.separator;
|
|
flatFileDirectory = mainDirectory + "flatfile" + File.separator;
|
|
@@ -503,7 +481,6 @@ public class mcMMO extends JavaPlugin {
|
|
|
|
|
|
private void fixFilePaths() {
|
|
private void fixFilePaths() {
|
|
File oldFlatfilePath = new File(mainDirectory + "FlatFileStuff" + File.separator);
|
|
File oldFlatfilePath = new File(mainDirectory + "FlatFileStuff" + File.separator);
|
|
- File oldModPath = new File(mainDirectory + "ModConfigs" + File.separator);
|
|
|
|
|
|
|
|
if (oldFlatfilePath.exists()) {
|
|
if (oldFlatfilePath.exists()) {
|
|
if (!oldFlatfilePath.renameTo(new File(flatFileDirectory))) {
|
|
if (!oldFlatfilePath.renameTo(new File(flatFileDirectory))) {
|
|
@@ -511,41 +488,6 @@ public class mcMMO extends JavaPlugin {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- if (oldModPath.exists()) {
|
|
|
|
- if (!oldModPath.renameTo(new File(modDirectory))) {
|
|
|
|
- getLogger().warning("Failed to rename ModConfigs to mods!");
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- File oldArmorFile = new File(modDirectory + "armor.yml");
|
|
|
|
- File oldBlocksFile = new File(modDirectory + "blocks.yml");
|
|
|
|
- File oldEntitiesFile = new File(modDirectory + "entities.yml");
|
|
|
|
- File oldToolsFile = new File(modDirectory + "tools.yml");
|
|
|
|
-
|
|
|
|
- if (oldArmorFile.exists()) {
|
|
|
|
- if (!oldArmorFile.renameTo(new File(modDirectory + "armor.default.yml"))) {
|
|
|
|
- getLogger().warning("Failed to rename armor.yml to armor.default.yml!");
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- if (oldBlocksFile.exists()) {
|
|
|
|
- if (!oldBlocksFile.renameTo(new File(modDirectory + "blocks.default.yml"))) {
|
|
|
|
- getLogger().warning("Failed to rename blocks.yml to blocks.default.yml!");
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- if (oldEntitiesFile.exists()) {
|
|
|
|
- if (!oldEntitiesFile.renameTo(new File(modDirectory + "entities.default.yml"))) {
|
|
|
|
- getLogger().warning("Failed to rename entities.yml to entities.default.yml!");
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- if (oldToolsFile.exists()) {
|
|
|
|
- if (!oldToolsFile.renameTo(new File(modDirectory + "tools.default.yml"))) {
|
|
|
|
- getLogger().warning("Failed to rename tools.yml to tools.default.yml!");
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
File currentFlatfilePath = new File(flatFileDirectory);
|
|
File currentFlatfilePath = new File(flatFileDirectory);
|
|
currentFlatfilePath.mkdirs();
|
|
currentFlatfilePath.mkdirs();
|
|
File localesDirectoryPath = new File(localesDirectory);
|
|
File localesDirectoryPath = new File(localesDirectory);
|
|
@@ -655,4 +597,4 @@ public class mcMMO extends JavaPlugin {
|
|
SPIGOT,
|
|
SPIGOT,
|
|
CRAFTBUKKIT
|
|
CRAFTBUKKIT
|
|
}
|
|
}
|
|
-}
|
|
|
|
|
|
+}
|