summaryrefslogtreecommitdiffstats
path: root/EssentialsAntiBuild/src/net/ess3/antibuild/AntiBuildHolder.java
blob: 206b4c72f0ffb73a9d923c731611a98627855005 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
package net.ess3.antibuild;

import java.io.File;
import net.ess3.api.IEssentials;
import net.ess3.settings.antibuild.Alert;
import net.ess3.settings.antibuild.AntiBuild;
import net.ess3.settings.antibuild.BlackList;
import net.ess3.storage.AsyncStorageObjectHolder;


public class AntiBuildHolder extends AsyncStorageObjectHolder<AntiBuild>
{
	public AntiBuildHolder(final IEssentials ess)
	{
		super(ess, AntiBuild.class, new File(ess.getPlugin().getDataFolder(), "antibuild.yml"));
		onReload();
	}

	@Override
	public void fillWithDefaults()
	{
		Alert alert = new Alert();
		BlackList blacklist = new BlackList();
		blacklist.setupDefaults();
		alert.setupDefaults();
		getData().setAlert(alert);
		getData().setBlacklist(blacklist);
	}
}