This commit is contained in:
Risto Lahtela 2017-07-09 16:13:29 +03:00
parent c72440d689
commit c17693331b
3 changed files with 6 additions and 6 deletions

View File

@ -185,11 +185,11 @@ public class Plan extends RslPlugin<Plan> {
@Override
public void onDisable() {
// Stop the UI Server
if (Verify.notNull(uiServer)) {
if (uiServer != null) {
uiServer.stop();
}
Bukkit.getScheduler().cancelTasks(this);
if (Verify.notNull(handler) && Verify.notNull(db)) {
if (Verify.notNull(handler, db)) {
Benchmark.start("DataCache OnDisable Save");
// Saves the datacache to the database without Bukkit's Schedulers.
Log.info(Phrase.CACHE_SAVE + "");
@ -262,7 +262,7 @@ public class Plan extends RslPlugin<Plan> {
private void startAnalysisRefreshTask(int everyXMinutes) throws IllegalStateException {
Benchmark.start("Enable: Schedule PeriodicAnalysisTask");
if (!Verify.positive(everyXMinutes)) {
if (everyXMinutes <= 0) {
return;
}
getRunnableFactory().createNew("PeriodicalAnalysisTask", new RslRunnable() {

View File

@ -122,7 +122,7 @@ public class DataCacheHandler extends LocationCache {
*/
public void startAsyncPeriodicSaveTask() throws IllegalArgumentException, IllegalStateException {
int minutes = Settings.SAVE_CACHE_MIN.getNumber();
if (!Verify.positive(minutes)) {
if (minutes <= 0) {
minutes = 5;
}
final int clearAfterXsaves;
@ -420,7 +420,7 @@ public class DataCacheHandler extends LocationCache {
*/
public void clearFromCache(UUID uuid) {
Log.debug(uuid + ": Clear");
if (Verify.notNull(plugin.fetch().getPlayer(uuid))) {
if (plugin.fetch().isOnline(uuid)) {
Log.debug(uuid + ": Online, did not clear");
UserData data = dataCache.get(uuid);
if (data != null) {

View File

@ -1,7 +1,7 @@
name: Plan
author: Rsl1122
main: main.java.com.djrapitops.plan.Plan
version: 3.5.0
version: 3.5.1
softdepend:
- OnTime