Move to APF 2.0.4

This commit is contained in:
Rsl1122 2017-08-17 10:13:23 +03:00
parent 77dd64d10a
commit b1692f07c5
4 changed files with 6 additions and 26 deletions

View File

@ -1,13 +0,0 @@
<component name="libraryTable">
<library name="Maven: com.djrapitops:abstract-plugin-framework:2.0.3">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/com/djrapitops/abstract-plugin-framework/2.0.3/abstract-plugin-framework-2.0.3.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/com/djrapitops/abstract-plugin-framework/2.0.3/abstract-plugin-framework-2.0.3-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/com/djrapitops/abstract-plugin-framework/2.0.3/abstract-plugin-framework-2.0.3-sources.jar!/" />
</SOURCES>
</library>
</component>

View File

@ -28,7 +28,7 @@
<dependency> <dependency>
<groupId>com.djrapitops</groupId> <groupId>com.djrapitops</groupId>
<artifactId>abstract-plugin-framework</artifactId> <artifactId>abstract-plugin-framework</artifactId>
<version>2.0.3</version> <version>2.0.4</version>
<scope>compile</scope> <scope>compile</scope>
</dependency> </dependency>
<!-- SoftDepended Plugins--> <!-- SoftDepended Plugins-->

View File

@ -88,7 +88,7 @@ public class Analysis {
log(Locale.get(Msg.ANALYSIS_FETCH).toString()); log(Locale.get(Msg.ANALYSIS_FETCH).toString());
Benchmark.start("Fetch Phase"); Benchmark.start("Fetch Phase");
Log.debug("Database", "Analysis Fetch"); Log.debug("Database", "Analysis Fetch");
plugin.processStatus().setStatus("Analysis", "Analysis Fetch Phase"); Log.debug("Analysis", "Analysis Fetch Phase");
try { try {
inspectCache.cacheAllUserData(db); inspectCache.cacheAllUserData(db);
} catch (Exception ex) { } catch (Exception ex) {
@ -141,7 +141,7 @@ public class Analysis {
long fetchPhaseLength = Benchmark.stop("Analysis", "Fetch Phase"); long fetchPhaseLength = Benchmark.stop("Analysis", "Fetch Phase");
Benchmark.start("Analysis Phase"); Benchmark.start("Analysis Phase");
plugin.processStatus().setStatus("Analysis", "Analysis Phase"); Log.debug("Analysis", "Analysis Phase");
log(Locale.get(Msg.ANALYSIS_PHASE_START).parse(rawData.size(), fetchPhaseLength)); log(Locale.get(Msg.ANALYSIS_PHASE_START).parse(rawData.size(), fetchPhaseLength));
String playersTable = PlayersTableCreator.createSortablePlayersTable(rawData); String playersTable = PlayersTableCreator.createSortablePlayersTable(rawData);
@ -153,7 +153,7 @@ public class Analysis {
Benchmark.stop("Analysis", "Analysis Phase"); Benchmark.stop("Analysis", "Analysis Phase");
log(Locale.get(Msg.ANALYSIS_3RD_PARTY).toString()); log(Locale.get(Msg.ANALYSIS_3RD_PARTY).toString());
plugin.processStatus().setStatus("Analysis", "Analyzing additional data sources (3rd party)"); Log.debug("Analysis", "Analyzing additional data sources (3rd party)");
analysisData.setAdditionalDataReplaceMap(analyzeAdditionalPluginData(uuids)); analysisData.setAdditionalDataReplaceMap(analyzeAdditionalPluginData(uuids));
analysisCache.cache(analysisData); analysisCache.cache(analysisData);
@ -172,7 +172,8 @@ public class Analysis {
ExportUtility.export(analysisData, rawData); ExportUtility.export(analysisData, rawData);
} catch (Exception e) { } catch (Exception e) {
Log.toLog(this.getClass().getName(), e); Log.toLog(this.getClass().getName(), e);
plugin.processStatus().setStatus("Analysis", "Error: " + e); Log.debug("Analysis", "Error: " + e);
Log.logDebug("Analysis");
return false; return false;
} }
return true; return true;
@ -248,11 +249,6 @@ public class Analysis {
} }
public void setTaskId(int id) { public void setTaskId(int id) {
if (id == -2) {
plugin.processStatus().setStatus("Analysis", "Temporarily Disabled");
} else if (id == -1) {
plugin.processStatus().setStatus("Analysis", "Enabled");
}
taskId = id; taskId = id;
} }

View File

@ -9,7 +9,6 @@ import com.djrapitops.plugin.task.RunnableFactory;
import com.djrapitops.plugin.utilities.BenchUtil; import com.djrapitops.plugin.utilities.BenchUtil;
import com.djrapitops.plugin.utilities.log.BukkitLog; import com.djrapitops.plugin.utilities.log.BukkitLog;
import com.djrapitops.plugin.utilities.player.Fetch; import com.djrapitops.plugin.utilities.player.Fetch;
import com.djrapitops.plugin.utilities.status.ProcessStatus;
import main.java.com.djrapitops.plan.Plan; import main.java.com.djrapitops.plan.Plan;
import main.java.com.djrapitops.plan.ServerVariableHolder; import main.java.com.djrapitops.plan.ServerVariableHolder;
import main.java.com.djrapitops.plan.Settings; import main.java.com.djrapitops.plan.Settings;
@ -106,13 +105,11 @@ public class TestInit {
BukkitLog<Plan> log = new BukkitLog<>(planMock, "console", ""); BukkitLog<Plan> log = new BukkitLog<>(planMock, "console", "");
BenchUtil bench = new BenchUtil(planMock); BenchUtil bench = new BenchUtil(planMock);
ServerVariableHolder serverVariableHolder = new ServerVariableHolder(mockServer); ServerVariableHolder serverVariableHolder = new ServerVariableHolder(mockServer);
ProcessStatus<Plan> process = new ProcessStatus<>(planMock);
Fetch fetch = new Fetch(planMock); Fetch fetch = new Fetch(planMock);
when(planMock.getPluginLogger()).thenReturn(log); when(planMock.getPluginLogger()).thenReturn(log);
when(planMock.benchmark()).thenReturn(bench); when(planMock.benchmark()).thenReturn(bench);
when(planMock.getVariable()).thenReturn(serverVariableHolder); when(planMock.getVariable()).thenReturn(serverVariableHolder);
when(planMock.processStatus()).thenReturn(process);
when(planMock.fetch()).thenReturn(fetch); when(planMock.fetch()).thenReturn(fetch);
RunnableFactory<Plan> runnableFactory = mockRunnableFactory(); RunnableFactory<Plan> runnableFactory = mockRunnableFactory();
when(planMock.getRunnableFactory()).thenReturn(runnableFactory); when(planMock.getRunnableFactory()).thenReturn(runnableFactory);