Fix PartySaving related NPEs (only save parties if they're enabled) (#4973)

Co-authored-by: Dieu <info@l4b.org>
This commit is contained in:
IAISI 2024-02-20 18:20:08 +01:00 committed by GitHub
parent 3361d28887
commit cdc187b211
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 3 deletions

View File

@ -384,7 +384,8 @@ public class mcMMO extends JavaPlugin {
UserManager.saveAll(); // Make sure to save player information if the server shuts down
UserManager.clearAll();
Alchemy.finishAllBrews(); // Finish all partially complete AlchemyBrewTasks to prevent vanilla brewing continuation on restart
getPartyManager().saveParties(); // Save our parties
if(partyConfig.isPartyEnabled())
getPartyManager().saveParties(); // Save our parties
//TODO: Needed?
if(generalConfig.getScoreboardsEnabled())

View File

@ -20,7 +20,7 @@ public class SaveTimerTask extends CancellableRunnable {
count++;
}
mcMMO.p.getPartyManager().saveParties();
if(mcMMO.p.getPartyConfig().isPartyEnabled())
mcMMO.p.getPartyManager().saveParties();
}
}