Fixed parties and /reload not playing nice together.

This commit is contained in:
GJ
2013-04-02 13:47:52 -04:00
parent fcc36ee5d7
commit f0c937ad47
2 changed files with 11 additions and 4 deletions

View File

@ -38,7 +38,6 @@ import com.gmail.nossr50.party.PartyManager;
import com.gmail.nossr50.runnables.SaveTimerTask;
import com.gmail.nossr50.runnables.database.UserPurgeTask;
import com.gmail.nossr50.runnables.party.PartyAutoKickTask;
import com.gmail.nossr50.runnables.party.PartyLoaderTask;
import com.gmail.nossr50.runnables.skills.BleedTimerTask;
import com.gmail.nossr50.runnables.skills.SkillMonitorTask;
import com.gmail.nossr50.skills.child.ChildConfig;
@ -116,6 +115,8 @@ public class mcMMO extends JavaPlugin {
registerEvents();
registerCustomRecipes();
PartyManager.loadParties();
// Setup the leader boards
if (Config.getInstance().getUseMySQL()) {
// TODO: Why do we have to check for a connection that hasn't be made yet?
@ -367,9 +368,6 @@ public class mcMMO extends JavaPlugin {
}
private void scheduleTasks() {
// Parties are loaded at the end of first server tick otherwise Server.getOfflinePlayer throws an IndexOutOfBoundsException
new PartyLoaderTask().runTaskLater(this, 0);
// Periodic save timer (Saves every 10 minutes by default)
long saveIntervalTicks = Config.getInstance().getSaveInterval() * 1200;