Fix autopurge npe

This commit is contained in:
Xephi 2014-09-18 05:09:02 +02:00
parent 3ef3ec3b38
commit 35a4e6508c

View File

@ -31,7 +31,6 @@ import org.bukkit.plugin.PluginManager;
import org.bukkit.plugin.RegisteredServiceProvider;
import org.bukkit.plugin.java.JavaPlugin;
import com.avaje.ebean.enhance.asm.commons.Method;
import com.earth2me.essentials.Essentials;
import com.maxmind.geoip.LookupService;
import com.onarandombox.MultiverseCore.MultiverseCore;
@ -596,10 +595,12 @@ public class AuthMe extends JavaPlugin {
Calendar calendar = Calendar.getInstance();
calendar.add(Calendar.DATE, -(Settings.purgeDelay));
long until = calendar.getTimeInMillis();
List<String> cleared = this.database.autoPurgeDatabase(until);
ConsoleLogger.info("AutoPurgeDatabase : " + cleared.size() + " accounts removed.");
List<String> cleared = database.autoPurgeDatabase(until);
if (cleared == null)
return;
if (cleared.isEmpty())
return;
ConsoleLogger.info("AutoPurgeDatabase : " + cleared.size() + " accounts removed.");
if (Settings.purgeEssentialsFile && this.ess != null)
dataManager.purgeEssentials(cleared);
if (Settings.purgePlayerDat)