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,6 +384,7 @@ 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
if(partyConfig.isPartyEnabled())
getPartyManager().saveParties(); // Save our parties
//TODO: Needed?

View File

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