Skip to content

Commit

Permalink
[2.6.0-DEV] Moved Tester to new Project, Removed PlanLite features, B…
Browse files Browse the repository at this point in the history
…ugfixes

- Fixed many cases where database might try to save empty data.
(Possible fixes to causes of #13 #8)
- Fixed partially ConcurrentModificationException causes by adding
uData.setAccessing to SaveMultipleUserData
- Sped up Graph creation with functional operations
  • Loading branch information
AuroraLS3 committed Feb 15, 2017
1 parent 249724c commit 595adfa
Show file tree
Hide file tree
Showing 40 changed files with 104 additions and 2,860 deletions.
26 changes: 2 additions & 24 deletions Plan/src/main/java/com/djrapitops/plan/Plan.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
* If not it should be visible on the distribution page.
* Or here
* https://github.com/Rsl1122/Plan-PlayerAnalytics/blob/master/Plan/src/main/resources/licence.yml
*/

*/
package main.java.com.djrapitops.plan;

import java.io.File;
Expand Down Expand Up @@ -65,7 +64,6 @@ Location Analysis to view meaningful locations on Dynmap (Investigate dynmap api
public class Plan extends JavaPlugin {

private API api;
private PlanLiteHook planLiteHook;
private DataCacheHandler handler;
private InspectCacheHandler inspectCache;
private AnalysisCacheHandler analysisCache;
Expand Down Expand Up @@ -108,7 +106,6 @@ public void onEnable() {
return;
}

hookPlanLite();
this.handler = new DataCacheHandler(this);
this.inspectCache = new InspectCacheHandler(this);
this.analysisCache = new AnalysisCacheHandler(this);
Expand All @@ -132,8 +129,7 @@ public void onEnable() {
startAnalysisRefreshTask(analysisRefreshMinutes);
}
} else if (!(Settings.SHOW_ALTERNATIVE_IP.isTrue())
|| (Settings.USE_ALTERNATIVE_UI.isTrue()
&& planLiteHook.isEnabled())) {
|| (Settings.USE_ALTERNATIVE_UI.isTrue())) {
consoleSender.sendMessage(Phrase.PREFIX + "" + Phrase.ERROR_NO_DATA_VIEW);
}
if (!Settings.SHOW_ALTERNATIVE_IP.isTrue() && getServer().getIp().isEmpty()) {
Expand All @@ -143,17 +139,6 @@ public void onEnable() {
log(Phrase.ENABLED + "");
}

/**
* Hooks PlanLite for UI and/or additional data.
*/
public void hookPlanLite() {
try {
planLiteHook = new PlanLiteHook(this);
} catch (NoClassDefFoundError | Exception e) {

}
}

/**
* Disables the plugin.
*
Expand Down Expand Up @@ -295,13 +280,6 @@ public DataCacheHandler getHandler() {
return handler;
}

/**
* @return PlanLiteHook
*/
public PlanLiteHook getPlanLiteHook() {
return planLiteHook;
}

/**
* @return the Database
*/
Expand Down
134 changes: 0 additions & 134 deletions Plan/src/main/java/com/djrapitops/plan/PlanLiteHook.java

This file was deleted.

3 changes: 1 addition & 2 deletions Plan/src/main/java/com/djrapitops/plan/Settings.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ public enum Settings {
ANALYSIS_REFRESH_ON_ENABLE("Settings.Cache.AnalysisCache.RefreshAnalysisCacheOnEnable"),
ANALYSIS_LOG_TO_CONSOLE("Settings.Analysis.LogProgressOnConsole"),
SHOW_ALTERNATIVE_IP("Settings.WebServer.ShowAlternativeServerIP"),
USE_ALTERNATIVE_UI("Settings.PlanLite.UseAsAlternativeUI"),
PLANLITE_ENABLED("Settings.PlanLite.Enabled"),
USE_ALTERNATIVE_UI("Settings.UseTextUI"),
GATHERLOCATIONS("Settings.Data.GatherLocations"),
SECURITY_IP_UUID("Settings.WebServer.Security.DisplayIPsAndUUIDs"),
// Integer
Expand Down
3 changes: 0 additions & 3 deletions Plan/src/main/java/com/djrapitops/plan/api/API.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import java.util.Date;
import java.util.UUID;
import main.java.com.djrapitops.plan.Plan;
import main.java.com.djrapitops.plan.PlanLiteHook;
import main.java.com.djrapitops.plan.data.AnalysisData;
import main.java.com.djrapitops.plan.data.UserData;
import main.java.com.djrapitops.plan.ui.DataRequestHandler;
Expand All @@ -18,7 +17,6 @@
public class API {

private Plan plugin;
private PlanLiteHook hook;

/**
* Class Construcor.
Expand All @@ -27,7 +25,6 @@ public class API {
*/
public API(Plan plugin) {
this.plugin = plugin;
hook = plugin.getPlanLiteHook();
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import java.util.List;
import main.java.com.djrapitops.plan.Phrase;
import main.java.com.djrapitops.plan.Plan;
import main.java.com.djrapitops.plan.PlanLiteHook;
import main.java.com.djrapitops.plan.command.commands.*;
import main.java.com.djrapitops.plan.utilities.FormatUtils;
import org.bukkit.command.Command;
Expand Down Expand Up @@ -37,12 +36,6 @@ public PlanCommand(Plan plugin) {
commands.add(new InfoCommand(plugin));
commands.add(new ReloadCommand(plugin));
commands.add(new ManageCommand(plugin));
PlanLiteHook planLiteHook = plugin.getPlanLiteHook();
if (planLiteHook != null) {
if (planLiteHook.isEnabled()) {
commands.add(new LiteCommand(plugin));
}
}
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import java.util.UUID;
import main.java.com.djrapitops.plan.Phrase;
import main.java.com.djrapitops.plan.Plan;
import main.java.com.djrapitops.plan.PlanLiteHook;
import main.java.com.djrapitops.plan.Settings;
import main.java.com.djrapitops.plan.command.CommandType;
import main.java.com.djrapitops.plan.command.SubCommand;
Expand Down Expand Up @@ -59,10 +58,9 @@ public boolean onCommand(CommandSender sender, Command cmd, String commandLabel,
final boolean useAlternativeIP = Settings.SHOW_ALTERNATIVE_IP.isTrue();
if (!Settings.WEBSERVER_ENABLED.isTrue()) {
if (!useAlternativeIP) {
PlanLiteHook planLiteHook = plugin.getPlanLiteHook();
if (Settings.USE_ALTERNATIVE_UI.isTrue() && planLiteHook.isEnabled()) {
if (Settings.USE_ALTERNATIVE_UI.isTrue()) {
sender.sendMessage(Phrase.CMD_PASS_PLANLITE + "");
planLiteHook.passCommand(sender, cmd, commandLabel, args);
//TODO CREATE TEXT UI
} else {
sender.sendMessage(Phrase.ERROR_WEBSERVER_OFF_INSPECT + "");
}
Expand Down

This file was deleted.

38 changes: 0 additions & 38 deletions Plan/src/main/java/com/djrapitops/plan/data/AnalysisData.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,6 @@ public class AnalysisData {
private long totalmobkills;
private long totaldeaths;

private boolean planLiteEnabled;
private PlanLiteAnalyzedData planLiteData;

/**
* Class constructor.
*
Expand All @@ -69,41 +66,6 @@ public void setJoinleaver(int joinleaver) {
this.joinleaver = joinleaver;
}

/**
* @return true if PlanLite was enabled at the time of Analysis
*/
public boolean isPlanLiteEnabled() {
return planLiteEnabled;
}

/**
* @param planLiteEnabled true if PlanLite was enabled at the time of
* Analysis
*/
public void setPlanLiteEnabled(boolean planLiteEnabled) {
this.planLiteEnabled = planLiteEnabled;
}

/**
* Retrieve the PlanLiteAnalyzedData.
*
* null if planLiteEnabled = false
*
* @return Seperate object used to save PlanLiteData
*/
public PlanLiteAnalyzedData getPlanLiteData() {
return planLiteData;
}

/**
* Set the PlanLiteAnalyzedData.
*
* @param planLiteData Seperate object used to save PlanLiteData
*/
public void setPlanLiteData(PlanLiteAnalyzedData planLiteData) {
this.planLiteData = planLiteData;
}

/**
* @return HTML String of the Month Activity graph
*/
Expand Down
Loading

0 comments on commit 595adfa

Please sign in to comment.