Removed use of MiscUtils#getTime in PluginBridge

This commit is contained in:
Rsl1122 2018-05-25 10:05:54 +03:00
parent 68281fdc55
commit ef781723b3
4 changed files with 6 additions and 10 deletions

View File

@ -8,7 +8,6 @@ package com.djrapitops.pluginbridge.plan.aac;
import com.djrapitops.plan.system.database.databases.Database;
import com.djrapitops.plan.system.database.databases.sql.SQLDB;
import com.djrapitops.plan.system.processing.Processing;
import com.djrapitops.plan.utilities.MiscUtils;
import com.djrapitops.plugin.api.utility.log.Log;
import me.konsolas.aac.api.AACAPIProvider;
import me.konsolas.aac.api.HackType;
@ -38,7 +37,7 @@ public class PlayerHackKickListener implements Listener {
Player player = event.getPlayer();
UUID uuid = player.getUniqueId();
HackType hackType = event.getHackType();
long time = MiscUtils.getTime();
long time = System.currentTimeMillis();
int violations = AACAPIProvider.getAPI().getViolationLevel(player, hackType);
HackObject hackObject = new HackObject(uuid, time, hackType, violations);

View File

@ -9,7 +9,6 @@ import com.djrapitops.plan.data.element.InspectContainer;
import com.djrapitops.plan.data.plugin.ContainerSize;
import com.djrapitops.plan.data.plugin.PluginData;
import com.djrapitops.plan.utilities.FormatUtils;
import com.djrapitops.plan.utilities.MiscUtils;
import com.djrapitops.plan.utilities.analysis.MathUtils;
import com.djrapitops.plugin.api.TimeAmount;
import com.hm.achievement.api.AdvancedAchievementsAPI;
@ -47,7 +46,7 @@ public class AdvancedAchievementsData extends PluginData {
@Override
public AnalysisContainer getServerData(Collection<UUID> collection, AnalysisContainer analysisContainer) {
if (MiscUtils.getTime() - lastRefresh > TimeAmount.MINUTE.ms() * 5L) {
if (System.currentTimeMillis() - lastRefresh > TimeAmount.MINUTE.ms() * 5L) {
refreshTotalAchievements();
}
long total = getTotal(totalAchievements);
@ -65,6 +64,6 @@ public class AdvancedAchievementsData extends PluginData {
private void refreshTotalAchievements() {
totalAchievements = aaAPI.getPlayersTotalAchievements();
lastRefresh = MiscUtils.getTime();
lastRefresh = System.currentTimeMillis();
}
}

View File

@ -6,7 +6,6 @@ package com.djrapitops.pluginbridge.plan.buycraft;
import com.djrapitops.plan.system.settings.Settings;
import com.djrapitops.plan.system.settings.theme.ThemeVal;
import com.djrapitops.plan.utilities.MiscUtils;
import com.djrapitops.plan.utilities.html.graphs.stack.AbstractStackGraph;
import com.djrapitops.plan.utilities.html.graphs.stack.StackDataSet;
import com.djrapitops.plugin.api.TimeAmount;
@ -32,7 +31,7 @@ public class MoneyStackGraph {
}
public static MoneyStackGraph create(List<Payment> payments) {
long now = MiscUtils.getTime();
long now = System.currentTimeMillis();
long oldestDate = payments.isEmpty() ? now : payments.get(payments.size() - 1).getDate();
String[] labels = getLabels(now, oldestDate);

View File

@ -8,7 +8,6 @@ import com.djrapitops.plan.data.container.TPS;
import com.djrapitops.plan.system.PlanSystem;
import com.djrapitops.plan.system.database.databases.Database;
import com.djrapitops.plan.utilities.FormatUtils;
import com.djrapitops.plan.utilities.MiscUtils;
import com.djrapitops.plan.utilities.analysis.Analysis;
import com.djrapitops.plan.utilities.analysis.MathUtils;
import com.djrapitops.plugin.api.TimeAmount;
@ -94,7 +93,7 @@ public class PlanPlaceholders extends PlaceholderExpansion {
private Serializable getServerValue(String identifier) {
Callable<ServerProfile> serverProfile = Analysis::getServerProfile;
long now = MiscUtils.getTime();
long now = System.currentTimeMillis();
long dayAgo = now - TimeAmount.DAY.ms();
long weekAgo = now - TimeAmount.WEEK.ms();
long monthAgo = now - TimeAmount.MONTH.ms();
@ -148,7 +147,7 @@ public class PlanPlaceholders extends PlaceholderExpansion {
UUID uuid = player.getUniqueId();
Callable<PlayerProfile> profile = () -> Database.getActive().fetch().getPlayerProfile(uuid);
long now = MiscUtils.getTime();
long now = System.currentTimeMillis();
long dayAgo = now - TimeAmount.DAY.ms();
long weekAgo = now - TimeAmount.WEEK.ms();
long monthAgo = now - TimeAmount.MONTH.ms();