mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-26 23:26:45 +01:00
Fixed parties not being loaded at startup
+ minor cleanup
This commit is contained in:
parent
5151be05b9
commit
a8fa625b5c
@ -104,7 +104,7 @@ public class mcMMO extends JavaPlugin {
|
|||||||
public static ChunkManager placeStore;
|
public static ChunkManager placeStore;
|
||||||
public static RepairManager repairManager;
|
public static RepairManager repairManager;
|
||||||
|
|
||||||
/* Jar Stuff */
|
// Jar Stuff
|
||||||
public static File mcmmo;
|
public static File mcmmo;
|
||||||
|
|
||||||
// File Paths
|
// File Paths
|
||||||
@ -132,6 +132,7 @@ public class mcMMO extends JavaPlugin {
|
|||||||
TreasuresConfig.getInstance();
|
TreasuresConfig.getInstance();
|
||||||
HiddenConfig.getInstance();
|
HiddenConfig.getInstance();
|
||||||
AdvancedConfig.getInstance();
|
AdvancedConfig.getInstance();
|
||||||
|
PartyManager.loadParties();
|
||||||
|
|
||||||
List<Repairable> repairables = new ArrayList<Repairable>();
|
List<Repairable> repairables = new ArrayList<Repairable>();
|
||||||
|
|
||||||
@ -207,6 +208,7 @@ public class mcMMO extends JavaPlugin {
|
|||||||
|
|
||||||
// Old & Powerless User remover
|
// Old & Powerless User remover
|
||||||
int purgeInterval = Config.getInstance().getPurgeInterval();
|
int purgeInterval = Config.getInstance().getPurgeInterval();
|
||||||
|
|
||||||
if (purgeInterval == 0) {
|
if (purgeInterval == 0) {
|
||||||
scheduler.scheduleSyncDelayedTask(this, new UserPurgeTask(), 40); // Start 2 seconds after startup.
|
scheduler.scheduleSyncDelayedTask(this, new UserPurgeTask(), 40); // Start 2 seconds after startup.
|
||||||
}
|
}
|
||||||
@ -219,7 +221,6 @@ public class mcMMO extends JavaPlugin {
|
|||||||
if (configInstance.getStatsTrackingEnabled()) {
|
if (configInstance.getStatsTrackingEnabled()) {
|
||||||
try {
|
try {
|
||||||
Metrics metrics = new Metrics(this);
|
Metrics metrics = new Metrics(this);
|
||||||
|
|
||||||
Graph graph = metrics.createGraph("Percentage of servers using timings");
|
Graph graph = metrics.createGraph("Percentage of servers using timings");
|
||||||
|
|
||||||
if (pluginManager.useTimings()) {
|
if (pluginManager.useTimings()) {
|
||||||
@ -246,14 +247,10 @@ public class mcMMO extends JavaPlugin {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get our ChunkletManager
|
placeStore = ChunkManagerFactory.getChunkManager(); // Get our ChunkletManager
|
||||||
placeStore = ChunkManagerFactory.getChunkManager();
|
|
||||||
|
|
||||||
// Automatically starts and stores itself
|
new MobStoreCleaner(); // Automatically starts and stores itself
|
||||||
new MobStoreCleaner();
|
Anniversary.createAnniversaryFile(); // Create Anniversary files
|
||||||
|
|
||||||
// Create Anniversary files
|
|
||||||
Anniversary.createAnniversaryFile();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -16,6 +16,8 @@ public final class PartyManager {
|
|||||||
private static String partiesFilePath = mcMMO.p.getDataFolder().getPath() + File.separator + "FlatFileStuff" + File.separator + "parties.yml";
|
private static String partiesFilePath = mcMMO.p.getDataFolder().getPath() + File.separator + "FlatFileStuff" + File.separator + "parties.yml";
|
||||||
private static List<Party> parties = new ArrayList<Party>();
|
private static List<Party> parties = new ArrayList<Party>();
|
||||||
|
|
||||||
|
private PartyManager() {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if two players are in the same party.
|
* Check if two players are in the same party.
|
||||||
*
|
*
|
||||||
@ -414,7 +416,7 @@ public final class PartyManager {
|
|||||||
/**
|
/**
|
||||||
* Load party file.
|
* Load party file.
|
||||||
*/
|
*/
|
||||||
private static void loadParties() {
|
public static void loadParties() {
|
||||||
File file = new File(partiesFilePath);
|
File file = new File(partiesFilePath);
|
||||||
|
|
||||||
if (!file.exists()) {
|
if (!file.exists()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user