mirror of
https://github.com/BentoBoxWorld/Challenges.git
synced 2024-11-05 10:22:05 +01:00
Improve SaveListener.
Save challenges un world save event only if in current world has any challenge.
This commit is contained in:
parent
4edc1c5c62
commit
b1c12e7454
@ -23,7 +23,10 @@ public class SaveListener implements Listener
|
||||
@EventHandler(priority = EventPriority.LOW, ignoreCancelled = true)
|
||||
public void onWorldSave(WorldSaveEvent e)
|
||||
{
|
||||
this.addon.getChallengesManager().save(e.isAsynchronous());
|
||||
if (!this.addon.getChallengesManager().getAllChallengesList(e.getWorld()).isEmpty())
|
||||
{
|
||||
this.addon.getChallengesManager().save(e.isAsynchronous());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user