mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2024-09-07 04:38:03 +02:00
Fix autopurge npe
This commit is contained in:
parent
3ef3ec3b38
commit
35a4e6508c
@ -31,7 +31,6 @@ import org.bukkit.plugin.PluginManager;
|
|||||||
import org.bukkit.plugin.RegisteredServiceProvider;
|
import org.bukkit.plugin.RegisteredServiceProvider;
|
||||||
import org.bukkit.plugin.java.JavaPlugin;
|
import org.bukkit.plugin.java.JavaPlugin;
|
||||||
|
|
||||||
import com.avaje.ebean.enhance.asm.commons.Method;
|
|
||||||
import com.earth2me.essentials.Essentials;
|
import com.earth2me.essentials.Essentials;
|
||||||
import com.maxmind.geoip.LookupService;
|
import com.maxmind.geoip.LookupService;
|
||||||
import com.onarandombox.MultiverseCore.MultiverseCore;
|
import com.onarandombox.MultiverseCore.MultiverseCore;
|
||||||
@ -596,10 +595,12 @@ public class AuthMe extends JavaPlugin {
|
|||||||
Calendar calendar = Calendar.getInstance();
|
Calendar calendar = Calendar.getInstance();
|
||||||
calendar.add(Calendar.DATE, -(Settings.purgeDelay));
|
calendar.add(Calendar.DATE, -(Settings.purgeDelay));
|
||||||
long until = calendar.getTimeInMillis();
|
long until = calendar.getTimeInMillis();
|
||||||
List<String> cleared = this.database.autoPurgeDatabase(until);
|
List<String> cleared = database.autoPurgeDatabase(until);
|
||||||
ConsoleLogger.info("AutoPurgeDatabase : " + cleared.size() + " accounts removed.");
|
if (cleared == null)
|
||||||
|
return;
|
||||||
if (cleared.isEmpty())
|
if (cleared.isEmpty())
|
||||||
return;
|
return;
|
||||||
|
ConsoleLogger.info("AutoPurgeDatabase : " + cleared.size() + " accounts removed.");
|
||||||
if (Settings.purgeEssentialsFile && this.ess != null)
|
if (Settings.purgeEssentialsFile && this.ess != null)
|
||||||
dataManager.purgeEssentials(cleared);
|
dataManager.purgeEssentials(cleared);
|
||||||
if (Settings.purgePlayerDat)
|
if (Settings.purgePlayerDat)
|
||||||
|
Loading…
Reference in New Issue
Block a user