Split Dependencies to another project, 3.4.3 implementation

Split dependencies into another project to make forking easier in the
future.

Implemented & Fixed:
#129
#130
#124
#123
#126

Did research work for
#74
#128
(Won't be implemented)
This commit is contained in:
Rsl1122 2017-06-12 23:03:16 +03:00
parent ddb796bfda
commit 6d0819fc45
59 changed files with 456 additions and 297 deletions

3
.gitignore vendored
View File

@ -10,4 +10,5 @@
/ProjectHelper/nbproject/
/ProjectHelper/target/
/Filetool/nbproject/private/
/Filetool/build/
/Filetool/build/
/PlanPluginBridge/target/

View File

@ -1,82 +1,127 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.djrapitops</groupId>
<artifactId>Plan</artifactId>
<version>2.0.0</version>
<build>
<sourceDirectory>${basedir}/src</sourceDirectory>
<defaultGoal>clean package install</defaultGoal>
<resources>
<resource>
<targetPath>.</targetPath>
<directory>${basedir}/src/main/resources</directory>
<includes>
<include>*.yml</include>
<include>*.html</include>
</includes>
</resource>
</resources>
<finalName>${project.name}</finalName>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.3</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<version>2.6</version>
</plugin>
<plugin>
<artifactId>maven-shade-plugin</artifactId>
<version>2.3</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
</execution>
</executions>
<configuration>
<artifactSet>
<includes>
<include>org.jfree:*</include>
</includes>
</artifactSet>
<relocations>
<relocation>
<pattern>org.jfree</pattern>
<shadedPattern>com.djrapitops.plan.jfree</shadedPattern>
</relocation>
</relocations>
<minimizeJar>false</minimizeJar>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>org.bukkit</groupId>
<artifactId>craftbukkit</artifactId>
<version>1.10.2-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.djrapitops</groupId>
<artifactId>plan.lite</artifactId>
<version>1.6.3</version>
<scope>provided</scope>
</dependency>
</dependencies>
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>
<modelVersion>4.0.0</modelVersion>
<groupId>com.djrapitops</groupId>
<artifactId>Plan</artifactId>
<version>3.4.3</version>
<build>
<sourceDirectory>${basedir}/src</sourceDirectory>
<defaultGoal>clean package install</defaultGoal>
<resources>
<resource>
<targetPath>.</targetPath>
<directory>${basedir}/src/main/resources</directory>
<includes>
<include>*.yml</include>
<include>*.html</include>
</includes>
</resource>
</resources>
<finalName>${project.name}</finalName>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.3</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<artifactId>maven-shade-plugin</artifactId>
<version>2.4.3</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
</execution>
</executions>
<configuration>
<filters>
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>org/**</exclude>
<exclude>javassist/**</exclude>
<exclude>mockito-extensions/**</exclude>
<exclude>net/**</exclude>
<exclude>junit/**</exclude>
<exclude>com/thoughtworks/**</exclude>
</excludes>
</filter>
</filters>
</configuration>
</plugin>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<version>2.6</version>
<configuration>
<excludes>
<exclude>**/test/*</exclude>
<exclude>**/*/test/*</exclude>
<exclude>**/*/test.*</exclude>
<exclude>**/test/**/*</exclude>
</excludes>
</configuration>
</plugin>
<plugin>
<groupId>org.pitest</groupId>
<artifactId>pitest-maven</artifactId>
<version>1.1.8</version>
<configuration>
<targetClasses>
<param>main.java.com.djrapitops.plan.*</param>
</targetClasses>
<targetTests>
<param>test.java.main.java.com.djrapitops.plan.*</param>
</targetTests>
<timeoutConstant>1000</timeoutConstant>
</configuration>
</plugin>
<plugin>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>2.17</version>
<configuration>
<excludes>**/test/**/*</excludes>
<configLocation>checkstyle.xml</configLocation>
</configuration>
</plugin>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.10.4</version>
<configuration>
<excludePackageNames>test.*</excludePackageNames>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>org.bukkit</groupId>
<artifactId>craftbukkit</artifactId>
<version>1.11.2-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock</artifactId>
<version>1.6.6</version>
<type>pom</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-core</artifactId>
<version>1.3</version>
<scope>test</scope>
</dependency>
</dependencies>
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>
</project>

View File

@ -3,18 +3,8 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.djrapitops</groupId>
<artifactId>Plan</artifactId>
<version>3.4.2</version>
<version>3.4.3</version>
<packaging>jar</packaging>
<repositories>
<!-- <repository>
<id>bukkit-repo</id>
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
</repository>-->
<repository>
<id>vault-repo</id>
<url>http://nexus.hc.to/content/repositories/pub_releases</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>org.bukkit</groupId>
@ -24,58 +14,10 @@
</dependency>
<!-- SoftDepended Plugins-->
<dependency>
<groupId>com.hm</groupId>
<artifactId>advanced.achievements</artifactId>
<version>5.2</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>me.edge209</groupId>
<artifactId>ontime</artifactId>
<version>4.1.4</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.earth2me</groupId>
<artifactId>essentials</artifactId>
<version>2.0.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.massivecraft</groupId>
<artifactId>factions</artifactId>
<version>2.10.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.gamingmesh</groupId>
<artifactId>jobs</artifactId>
<version>3.9.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.massivecraft</groupId>
<artifactId>mcore</artifactId>
<version>2.10.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.gmail.nossr50</groupId>
<artifactId>mcmmo</artifactId>
<version>1.5.07</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.palmergames</groupId>
<artifactId>towny</artifactId>
<version>0.91.4.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>net.milkbowl.vault</groupId>
<artifactId>VaultAPI</artifactId>
<version>1.6</version>
<scope>provided</scope>
<groupId>com.djrapitops</groupId>
<artifactId>PlanPluginBridge</artifactId>
<version>3.4.3</version>
<scope>compile</scope>
</dependency>
<!-- -->
<dependency>
@ -158,6 +100,34 @@
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>2.4.3</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
</execution>
</executions>
<configuration>
<filters>
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>org/**</exclude>
<exclude>javassist/**</exclude>
<exclude>mockito-extensions/**</exclude>
<exclude>net/**</exclude>
<exclude>junit/**</exclude>
<exclude>com/thoughtworks/**</exclude>
</excludes>
</filter>
</filters>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>

View File

@ -34,6 +34,7 @@ public enum Settings {
ENABLED_ONT("Customization.Plugins.Enabled.OnTime"),
ENABLED_TOW("Customization.Plugins.Enabled.Towny"),
ENABLED_VAU("Customization.Plugins.Enabled.Vault"),
LINK_PROTOCOL("Settings.WebServer.LinkProtocol"),
// Integer
ANALYSIS_MINUTES_FOR_ACTIVE("Settings.Analysis.MinutesPlayedUntilConsidiredActive"),
SAVE_CACHE_MIN("Settings.Cache.DataCache.SaveEveryXMinutes"),
@ -61,6 +62,7 @@ public enum Settings {
//
FORMAT_YEAR("Customization.Formats.TimeAmount.Year"),
FORMAT_YEARS("Customization.Formats.TimeAmount.Years"),
FORMAT_DAY("Customization.Formats.TimeAmount.Day"),
FORMAT_DAYS("Customization.Formats.TimeAmount.Days"),
FORMAT_HOURS("Customization.Formats.TimeAmount.Hours"),
FORMAT_MINUTES("Customization.Formats.TimeAmount.Minutes"),

View File

@ -83,7 +83,7 @@ public class API {
* @return ip:port/security/player/Playername
*/
public String getPlayerInspectPageLink(String name) {
return HtmlUtils.getInspectUrl(name);
return HtmlUtils.getInspectUrlWithProtocol(name);
}
/**

View File

@ -90,7 +90,7 @@ public class AnalyzeCommand extends SubCommand {
sender.sendMessage(TextUI.getAnalysisMessages());
} else {
// Link
String url = HtmlUtils.getServerAnalysisUrl();
String url = HtmlUtils.getServerAnalysisUrlWithProtocol();
String message = Phrase.CMD_LINK + "";
boolean console = !(sender instanceof Player);
if (console) {

View File

@ -101,7 +101,7 @@ public class InspectCommand extends SubCommand {
sender.sendMessage(TextUI.getInspectMessages(uuid));
} else {
// Link
String url = HtmlUtils.getInspectUrl(playerName);
String url = HtmlUtils.getInspectUrlWithProtocol(playerName);
String message = Phrase.CMD_LINK + "";
boolean console = !(sender instanceof Player);
if (console) {

View File

@ -81,7 +81,7 @@ public class SearchCommand extends SubCommand {
String name = match.getName();
sender.sendMessage(Phrase.CMD_MATCH + name);
// Link
String url = HtmlUtils.getInspectUrl(name);
String url = HtmlUtils.getInspectUrlWithProtocol(name);
String message = Phrase.CMD_LINK + "";
boolean console = !(sender instanceof Player);
if (console) {

View File

@ -1,9 +1,5 @@
package main.java.com.djrapitops.plan.data.additional;
import main.java.com.djrapitops.plan.data.additional.advancedachievements.AdvancedAchievementsTable;
import main.java.com.djrapitops.plan.data.additional.factions.FactionsTable;
import main.java.com.djrapitops.plan.data.additional.towny.TownyTable;
/**
* This class contains Enum values for different types of Analysis that can be
* performed on values of PluginData.
@ -102,10 +98,6 @@ public enum AnalysisType {
*
* Can be used to add Tables, Images (for example maps) and other html
* elements.
*
* @see AdvancedAchievementsTable
* @see FactionsTable
* @see TownyTable
*/
HTML;

View File

@ -1,7 +1,6 @@
package main.java.com.djrapitops.plan.data.additional;
import main.java.com.djrapitops.plan.data.additional.essentials.EssentialsHook;
import main.java.com.djrapitops.plan.data.additional.advancedachievements.AdvancedAchievementsHook;
import com.djrapitops.pluginbridge.plan.Bridge;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
@ -10,13 +9,6 @@ import java.util.Map;
import java.util.UUID;
import java.util.stream.Collectors;
import main.java.com.djrapitops.plan.Log;
import main.java.com.djrapitops.plan.Settings;
import main.java.com.djrapitops.plan.data.additional.factions.FactionsHook;
import main.java.com.djrapitops.plan.data.additional.jobs.JobsHook;
import main.java.com.djrapitops.plan.data.additional.mcmmo.McmmoHook;
import main.java.com.djrapitops.plan.data.additional.ontime.OnTimeHook;
import main.java.com.djrapitops.plan.data.additional.towny.TownyHook;
import main.java.com.djrapitops.plan.data.additional.vault.VaultHook;
import main.java.com.djrapitops.plan.utilities.HtmlUtils;
/**
@ -35,7 +27,12 @@ public class HookHandler {
*/
public HookHandler() {
additionalDataSources = new ArrayList<>();
hook();
try {
Bridge.hook(this);
} catch (Throwable e) {
Log.toLog(this.getClass().getName(), e);
Log.error("Plan Plugin Bridge not included in the plugin jar.");
}
}
/**
@ -62,57 +59,6 @@ public class HookHandler {
return additionalDataSources;
}
private void hook() {
try {
if (Settings.ENABLED_AA.isTrue()) {
AdvancedAchievementsHook advancedAchievementsHook = new AdvancedAchievementsHook(this);
}
} catch (NoClassDefFoundError e) {
}
try {
if (Settings.ENABLED_ESS.isTrue()) {
EssentialsHook essentialsHook = new EssentialsHook(this);
}
} catch (NoClassDefFoundError e) {
}
try {
if (Settings.ENABLED_FAC.isTrue()) {
FactionsHook factionsHook = new FactionsHook(this);
}
} catch (NoClassDefFoundError e) {
}
try {
if (Settings.ENABLED_MCM.isTrue()) {
McmmoHook mcMmoHook = new McmmoHook(this);
}
} catch (NoClassDefFoundError e) {
}
try {
if (Settings.ENABLED_JOB.isTrue()) {
JobsHook jobsHook = new JobsHook(this);
}
} catch (NoClassDefFoundError e) {
}
try {
if (Settings.ENABLED_ONT.isTrue()) {
OnTimeHook onTimeHook = new OnTimeHook(this);
}
} catch (NoClassDefFoundError e) {
}
try {
if (Settings.ENABLED_TOW.isTrue()) {
TownyHook townyHook = new TownyHook(this);
}
} catch (NoClassDefFoundError e) {
}
try {
if (Settings.ENABLED_VAU.isTrue()) {
VaultHook vaultHook = new VaultHook(this);
}
} catch (NoClassDefFoundError e) {
}
}
/**
* Used to get the Layout with PluginData placeholders to replace %plugins%
* placeholder on analysis.hmtl.

View File

@ -4,6 +4,7 @@ import java.util.Collection;
import java.util.UUID;
import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.BlockingQueue;
import java.util.stream.Collectors;
import main.java.com.djrapitops.plan.Log;
import main.java.com.djrapitops.plan.Phrase;
import main.java.com.djrapitops.plan.Settings;
@ -47,6 +48,7 @@ public class DataCacheClearQueue extends Queue<UUID>{
if (uuids.isEmpty()) {
return;
}
uuids = uuids.stream().filter(u -> u != null).collect(Collectors.toList());
Log.debug("Scheduling for clear: " + uuids);
try {
queue.addAll(uuids);

View File

@ -1,7 +1,10 @@
package main.java.com.djrapitops.plan.data.handling.importing;
import com.djrapitops.pluginbridge.plan.Bridge;
import com.djrapitops.pluginbridge.plan.importing.OnTimeImporter;
import java.util.HashMap;
import java.util.Map;
import main.java.com.djrapitops.plan.Log;
import static org.bukkit.Bukkit.getPluginManager;
/**
@ -29,7 +32,13 @@ public class ImportUtils {
*/
public static Map<String, Importer> getImporters() {
Map<String, Importer> importers = new HashMap<>();
importers.put("ontime", new OnTimeImporter());
try {
importers.put("ontime", new OnTimeImporter());
} catch (Throwable e) {
Log.toLog("ImportUtils.getImporters", e);
Log.error("Plan Plugin Bridge not included in the plugin jar.");
}
return importers;
}
}

View File

@ -751,7 +751,9 @@ public class UsersTable extends Table {
continue;
}
if (!savedUUIDs.contains(uuid)) {
saveLast.add(uData);
if (!saveLast.contains(uData)) {
saveLast.add(uData);
}
continue;
}
uData.access();

View File

@ -49,13 +49,15 @@ public class Response {
Log.debug("Request: " + requestUri);
String[] requestArgs = requestUri.split("/");
boolean forbidden = false;
String securityCode = "";
String givenCode = "";
String securityCode = Settings.SECURITY_CODE + "";
if (requestArgs.length <= 2) {
forbidden = true;
} else {
securityCode = requestArgs[1];
givenCode = requestArgs[1];
}
if (!securityCode.equals(Settings.SECURITY_CODE + "")) {
if (!givenCode.equals(securityCode)) {
forbidden = true;
}
if (forbidden) {

View File

@ -106,18 +106,34 @@ public class FormatUtils {
}
}
if (days != 0) {
builder.append(Settings.FORMAT_DAYS.toString().replace("%days%", "" + days));
if (days == 1) {
builder.append(Settings.FORMAT_DAY.toString());
} else {
builder.append(Settings.FORMAT_DAYS.toString().replace("%days%", "" + days));
}
}
if (hours != 0) {
builder.append(Settings.FORMAT_HOURS.toString().replace("%hours%", "" + hours));
String h = Settings.FORMAT_HOURS.toString().replace("%hours%", "" + hours);
if (h.contains("%zero%") && (hours+"").length() == 1) {
builder.append('0');
}
builder.append(h);
}
if (minutes != 0) {
builder.append(Settings.FORMAT_MINUTES.toString().replace("%minutes%", "" + minutes));
String m = Settings.FORMAT_MINUTES.toString().replace("%minutes%", "" + minutes);
if (m.contains("%zero%") && (minutes+"").length() == 1) {
builder.append('0');
}
builder.append(m);
}
if (seconds != 0) {
builder.append(Settings.FORMAT_SECONDS.toString().replace("%seconds%", "" + seconds));
if (seconds != 0) {
String s = Settings.FORMAT_SECONDS.toString().replace("%seconds%", "" + seconds);
if (s.contains("%zero%") && (seconds+"").length() == 1) {
builder.append('0');
}
builder.append(s);
}
String formattedTime = builder.toString();
String formattedTime = builder.toString().replace("%zero%", "");
if (formattedTime.isEmpty()) {
return Settings.FORMAT_SECONDS.toString().replace("%seconds%", "0");
}

View File

@ -49,6 +49,10 @@ public class HtmlUtils {
return html;
}
public static String getServerAnalysisUrlWithProtocol() {
return Settings.LINK_PROTOCOL.toString()+getServerAnalysisUrl();
}
/**
*
* @return
@ -61,10 +65,14 @@ public class HtmlUtils {
if (useAlternativeIP) {
ip = Settings.ALTERNATIVE_IP.toString().replaceAll("%port%", "" + port);
}
String url = "http://" + ip + "/" + securityCode + "/server";
String url = /*"http:*/"//" + ip + "/" + securityCode + "/server";
return url;
}
public static String getInspectUrlWithProtocol(String playerName) {
return Settings.LINK_PROTOCOL.toString()+getInspectUrl(playerName);
}
/**
*
* @param playerName
@ -78,7 +86,7 @@ public class HtmlUtils {
if (useAlternativeIP) {
ip = Settings.ALTERNATIVE_IP.toString().replaceAll("%port%", "" + port);
}
String url = "http://" + ip + "/" + securityCode + "/player/" + playerName;
String url = /*"http:*/"//" + ip + "/" + securityCode + "/player/" + playerName;
return url;
}

View File

@ -1,5 +1,6 @@
package main.java.com.djrapitops.plan.utilities.analysis;
import main.java.com.djrapitops.plan.data.additional.HookHandler;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
@ -17,7 +18,6 @@ import main.java.com.djrapitops.plan.data.RawAnalysisData;
import main.java.com.djrapitops.plan.data.SessionData;
import main.java.com.djrapitops.plan.data.UserData;
import main.java.com.djrapitops.plan.data.additional.AnalysisType;
import main.java.com.djrapitops.plan.data.additional.HookHandler;
import main.java.com.djrapitops.plan.data.additional.PluginData;
import main.java.com.djrapitops.plan.data.cache.AnalysisCacheHandler;
import main.java.com.djrapitops.plan.data.cache.DataCacheHandler;
@ -164,7 +164,7 @@ public class Analysis {
analysisCache.cache(analysisData);
long time = Benchmark.stop("Analysis");
if (Settings.ANALYSIS_LOG_FINISHED.isTrue()) {
Log.info(Phrase.ANALYSIS_COMPLETE.parse(time + "", HtmlUtils.getServerAnalysisUrl()));
Log.info(Phrase.ANALYSIS_COMPLETE.parse(time + "", HtmlUtils.getServerAnalysisUrlWithProtocol()));
}
// LocationAnalysis.performAnalysis(analysisData, plugin.getDB());
ExportUtility.export(plugin, analysisData, rawData);

View File

@ -1,8 +1,3 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package main.java.com.djrapitops.plan.utilities.analysis;
import java.io.File;
@ -52,7 +47,7 @@ public class ExportUtility {
Benchmark.start("Exporting Html pages");
try {
File folder = getFolder();
writeAnalysisHtml(analysisData, folder);
writeAnalysisHtml(analysisData, new File(folder, "server"));
File playersFolder = getPlayersFolder(folder);
for (UserData userData : rawData) {
writeInspectHtml(userData, playersFolder);
@ -85,14 +80,14 @@ public class ExportUtility {
Files.write(inspectHtmlFile.toPath(), Arrays.asList(inspectHtml));
}
public static void writeAnalysisHtml(AnalysisData analysisData, File folder) throws FileNotFoundException, IOException {
public static void writeAnalysisHtml(AnalysisData analysisData, File serverFolder) throws FileNotFoundException, IOException {
if (!Settings.ANALYSIS_EXPORT.isTrue()) {
return;
}
String analysisHtml = HtmlUtils.replacePlaceholders(HtmlUtils.getHtmlStringFromResource("analysis.html"),
PlaceholderUtils.getAnalysisReplaceRules(analysisData))
.replace(HtmlUtils.getInspectUrl(""), "./player/");
File analysisHtmlFile = new File(folder, "analysis.html");
File analysisHtmlFile = new File(serverFolder, "index.html");
if (analysisHtmlFile.exists()) {
analysisHtmlFile.delete();
}

View File

@ -282,7 +282,7 @@ header p {
<body onload="countUpTimer()">
<header>
<div class="header-content">
<img src="http://puu.sh/tJZUb/c2e0ab220f.png" alt="Player Analytics | Analysis">
<img src="https://puu.sh/tJZUb/c2e0ab220f.png" alt="Player Analytics | Analysis">
<p>Player Analytics v.%version%</p>
<h1><span id="navbutton" onclick="openNav()">&#9776; </span>%servername% | Server Analysis</h1>
</div>
@ -857,7 +857,7 @@ function countUpTimer() {
setTimeout('countUpTimer()', 1000);
}
</script>
<script src="http://www.kryogenix.org/code/browser/sorttable/sorttable.js"></script>
<script src="https://www.kryogenix.org/code/browser/sorttable/sorttable.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.5.0/Chart.bundle.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.5.0/Chart.js"></script>
<script>

View File

@ -35,6 +35,7 @@ Settings:
InternalIP: 0.0.0.0
ShowAlternativeServerIP: false
AlternativeIP: your.ip.here:%port%
LinkProtocol: http
Security:
DisplayIPsAndUUIDs: true
AddressSecurityCode: bAkEd
@ -48,6 +49,7 @@ Customization:
TimeAmount:
Year: '1 year, '
Years: '%years% years, '
Day: '1d '
Days: '%days%d '
Hours: '%hours%h '
Minutes: '%minutes%m '

View File

@ -62,9 +62,12 @@ The code & resources can be modified & run if the following conditions apply:
a1: Modifyer was paid to modify part of the software for customization of visual appearance of the software or fix Exceptions & Errors caused
by updates to Minecraft Server software.
4. Usage of part of code in another software
This part (4) of the licence does not include the usage of the API of the plugin,
or adding the compiled code as provided dependency. Such use is allowed.
Usage of a part of code in another software is allowed if following conditions apply:
a. The software falls under this licence
b. This licence is accepted by the person using the code inside their software

View File

@ -319,7 +319,7 @@ table.sortable th:not(.sorttable_sorted):not(.sorttable_sorted_reverse):not(.sor
<body>
<header>
<div class="header-content">
<img style="float: right; padding: 5px" src="http://puu.sh/tJZUb/c2e0ab220f.png" alt="Player Analytics | Analysis">
<img style="float: right; padding: 5px" src="https://puu.sh/tJZUb/c2e0ab220f.png" alt="Player Analytics | Analysis">
<p style="float: right; text-align: right;">Player Analytics v.%version%</p>
<h1><span id="navbutton" onclick="openNav()">&#9776; </span>%servername% | Inspect Player %name%%op%</h1>
</div>
@ -360,7 +360,7 @@ table.sortable th:not(.sorttable_sorted):not(.sorttable_sorted_reverse):not(.sor
</div>
</div>
</div>
<img style="float: right; padding: 5px" alt="%name%" src="http://cravatar.eu/head/%name%/128.png">
<img style="float: right; padding: 5px" alt="%name%" src="https://cravatar.eu/head/%name%/128.png">
<p><i class="fa fa-user" aria-hidden="true"></i> %active% %isonline%%banned%<br/>
<i class="fa fa-address-card-o" aria-hidden="true"></i> Nicknames: %nicknames%<br/>
<i class="fa fa-clock-o" aria-hidden="true"></i> Playtime: %playtime%<br/>
@ -641,7 +641,7 @@ function countUpTimer() {
setTimeout('countUpTimer()', 1000);
}
</script>
<script src="http://www.kryogenix.org/code/browser/sorttable/sorttable.js"></script>
<script src="https://www.kryogenix.org/code/browser/sorttable/sorttable.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.5.0/Chart.bundle.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.5.0/Chart.js"></script>
<script>

View File

@ -11,6 +11,7 @@ import main.java.com.djrapitops.plan.utilities.HtmlUtils;
import org.bukkit.plugin.java.JavaPlugin;
import static org.junit.Assert.*;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.powermock.core.classloader.annotations.PrepareForTest;
@ -83,7 +84,7 @@ public class HtmlUtilsTest {
*/
@Test
public void testGetServerAnalysisUrl() throws FileNotFoundException {
String result = HtmlUtils.getServerAnalysisUrl();
String result = HtmlUtils.getServerAnalysisUrlWithProtocol();
String exp = "http://0.0.0.0:8804/bAkEd/server";
assertEquals(exp, result);
}
@ -95,7 +96,7 @@ public class HtmlUtilsTest {
public void testGetInspectUrl() {
String playerName = "Test";
String expResult = "http://0.0.0.0:8804/bAkEd/player/Test";
String result = HtmlUtils.getInspectUrl(playerName);
String result = HtmlUtils.getInspectUrlWithProtocol(playerName);
assertEquals(expResult, result);
}

87
PlanPluginBridge/pom.xml Normal file
View File

@ -0,0 +1,87 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.djrapitops</groupId>
<artifactId>PlanPluginBridge</artifactId>
<version>3.4.3</version>
<packaging>jar</packaging>
<repositories>
<repository>
<id>vault-repo</id>
<url>http://nexus.hc.to/content/repositories/pub_releases</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>com.djrapitops</groupId>
<artifactId>Plan</artifactId>
<version>3.4.3</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.bukkit</groupId>
<artifactId>craftbukkit</artifactId>
<version>1.11.2-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.hm</groupId>
<artifactId>advanced.achievements</artifactId>
<version>5.2</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>me.edge209</groupId>
<artifactId>ontime</artifactId>
<version>4.1.4</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.earth2me</groupId>
<artifactId>essentials</artifactId>
<version>2.0.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.massivecraft</groupId>
<artifactId>factions</artifactId>
<version>2.10.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.gamingmesh</groupId>
<artifactId>jobs</artifactId>
<version>3.9.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.massivecraft</groupId>
<artifactId>mcore</artifactId>
<version>2.10.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.gmail.nossr50</groupId>
<artifactId>mcmmo</artifactId>
<version>1.5.07</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.palmergames</groupId>
<artifactId>towny</artifactId>
<version>0.91.4.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>net.milkbowl.vault</groupId>
<artifactId>VaultAPI</artifactId>
<version>1.6</version>
<scope>provided</scope>
</dependency>
</dependencies>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>
</project>

View File

@ -0,0 +1,75 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package com.djrapitops.pluginbridge.plan;
import com.djrapitops.pluginbridge.plan.advancedachievements.AdvancedAchievementsHook;
import com.djrapitops.pluginbridge.plan.essentials.EssentialsHook;
import com.djrapitops.pluginbridge.plan.factions.FactionsHook;
import com.djrapitops.pluginbridge.plan.jobs.JobsHook;
import com.djrapitops.pluginbridge.plan.mcmmo.McmmoHook;
import com.djrapitops.pluginbridge.plan.ontime.OnTimeHook;
import com.djrapitops.pluginbridge.plan.towny.TownyHook;
import com.djrapitops.pluginbridge.plan.vault.VaultHook;
import main.java.com.djrapitops.plan.Plan;
import main.java.com.djrapitops.plan.Settings;
import main.java.com.djrapitops.plan.data.additional.HookHandler;
/**
*
* @author Risto
*/
public class Bridge {
public static void hook(HookHandler handler) {
try {
if (Settings.ENABLED_AA.isTrue()) {
AdvancedAchievementsHook advancedAchievementsHook = new AdvancedAchievementsHook(handler);
}
} catch (NoClassDefFoundError e) {
}
try {
if (Settings.ENABLED_ESS.isTrue()) {
EssentialsHook essentialsHook = new EssentialsHook(handler);
}
} catch (NoClassDefFoundError e) {
}
try {
if (Settings.ENABLED_FAC.isTrue()) {
FactionsHook factionsHook = new FactionsHook(handler);
}
} catch (NoClassDefFoundError e) {
}
try {
if (Settings.ENABLED_MCM.isTrue()) {
McmmoHook mcMmoHook = new McmmoHook(handler);
}
} catch (NoClassDefFoundError e) {
}
try {
if (Settings.ENABLED_JOB.isTrue()) {
JobsHook jobsHook = new JobsHook(handler);
}
} catch (NoClassDefFoundError e) {
}
try {
if (Settings.ENABLED_ONT.isTrue()) {
OnTimeHook onTimeHook = new OnTimeHook(handler);
}
} catch (NoClassDefFoundError e) {
}
try {
if (Settings.ENABLED_TOW.isTrue()) {
TownyHook townyHook = new TownyHook(handler);
}
} catch (NoClassDefFoundError e) {
}
try {
if (Settings.ENABLED_VAU.isTrue()) {
VaultHook vaultHook = new VaultHook(handler);
}
} catch (NoClassDefFoundError e) {
}
}
}

View File

@ -1,4 +1,4 @@
package main.java.com.djrapitops.plan.data.additional;
package com.djrapitops.pluginbridge.plan;
import org.bukkit.plugin.java.JavaPlugin;
import static org.bukkit.plugin.java.JavaPlugin.getPlugin;

View File

@ -1,4 +1,4 @@
package main.java.com.djrapitops.plan.data.additional.advancedachievements;
package com.djrapitops.pluginbridge.plan.advancedachievements;
import com.hm.achievement.api.AdvancedAchievementsAPI;
import java.io.Serializable;

View File

@ -1,6 +1,6 @@
package main.java.com.djrapitops.plan.data.additional.advancedachievements;
package com.djrapitops.pluginbridge.plan.advancedachievements;
import main.java.com.djrapitops.plan.data.additional.Hook;
import com.djrapitops.pluginbridge.plan.Hook;
import com.hm.achievement.AdvancedAchievements;
import com.hm.achievement.api.AdvancedAchievementsAPI;
import com.hm.achievement.api.AdvancedAchievementsBukkitAPI;
@ -9,8 +9,8 @@ import main.java.com.djrapitops.plan.data.additional.HookHandler;
import static org.bukkit.plugin.java.JavaPlugin.getPlugin;
/**
* A Class responsible for hooking to AdvancedAchievements and registering 2 data
* sources.
* A Class responsible for hooking to AdvancedAchievements and registering 2
* data sources.
*
* @author Rsl1122
* @since 3.1.0

View File

@ -1,4 +1,4 @@
package main.java.com.djrapitops.plan.data.additional.advancedachievements;
package com.djrapitops.pluginbridge.plan.advancedachievements;
import com.hm.achievement.api.AdvancedAchievementsAPI;
import java.io.Serializable;

View File

@ -1,9 +1,9 @@
package main.java.com.djrapitops.plan.data.additional.essentials;
package com.djrapitops.pluginbridge.plan.essentials;
import main.java.com.djrapitops.plan.data.additional.Hook;
import main.java.com.djrapitops.plan.data.additional.HookHandler;
import com.djrapitops.pluginbridge.plan.Hook;
import com.earth2me.essentials.Essentials;
import main.java.com.djrapitops.plan.api.API;
import main.java.com.djrapitops.plan.data.additional.HookHandler;
import static org.bukkit.plugin.java.JavaPlugin.getPlugin;
/**

View File

@ -1,4 +1,4 @@
package main.java.com.djrapitops.plan.data.additional.essentials;
package com.djrapitops.pluginbridge.plan.essentials;
import com.earth2me.essentials.Essentials;
import com.earth2me.essentials.User;

View File

@ -1,4 +1,4 @@
package main.java.com.djrapitops.plan.data.additional.essentials;
package com.djrapitops.pluginbridge.plan.essentials;
import com.earth2me.essentials.Essentials;
import com.earth2me.essentials.User;

View File

@ -1,4 +1,4 @@
package main.java.com.djrapitops.plan.data.additional.essentials;
package com.djrapitops.pluginbridge.plan.essentials;
import com.earth2me.essentials.Essentials;
import com.earth2me.essentials.Warps;

View File

@ -1,4 +1,4 @@
package main.java.com.djrapitops.plan.data.additional.factions;
package com.djrapitops.pluginbridge.plan.factions;
import com.massivecraft.factions.entity.Faction;
import java.util.Comparator;

View File

@ -1,4 +1,4 @@
package main.java.com.djrapitops.plan.data.additional.factions;
package com.djrapitops.pluginbridge.plan.factions;
import com.massivecraft.factions.entity.MPlayer;
import java.io.Serializable;

View File

@ -1,6 +1,7 @@
package main.java.com.djrapitops.plan.data.additional.factions;
package com.djrapitops.pluginbridge.plan.factions;
import main.java.com.djrapitops.plan.data.additional.Hook;
import main.java.com.djrapitops.plan.data.additional.HookHandler;
import com.djrapitops.pluginbridge.plan.Hook;
import com.massivecraft.factions.entity.Faction;
import com.massivecraft.factions.entity.FactionColl;
import java.util.ArrayList;
@ -9,7 +10,6 @@ import java.util.List;
import java.util.stream.Collectors;
import main.java.com.djrapitops.plan.Settings;
import main.java.com.djrapitops.plan.api.API;
import main.java.com.djrapitops.plan.data.additional.HookHandler;
/**
* A Class responsible for hooking to Factions and registering 4 data sources.

View File

@ -1,4 +1,4 @@
package main.java.com.djrapitops.plan.data.additional.factions;
package com.djrapitops.pluginbridge.plan.factions;
import com.massivecraft.factions.entity.MPlayer;
import java.io.Serializable;

View File

@ -1,4 +1,4 @@
package main.java.com.djrapitops.plan.data.additional.factions;
package com.djrapitops.pluginbridge.plan.factions;
import com.massivecraft.factions.entity.MPlayer;
import java.io.Serializable;

View File

@ -1,4 +1,4 @@
package main.java.com.djrapitops.plan.data.additional.factions;
package com.djrapitops.pluginbridge.plan.factions;
import com.massivecraft.factions.entity.Faction;
import com.massivecraft.factions.entity.MPlayer;

View File

@ -1,7 +1,8 @@
package main.java.com.djrapitops.plan.data.handling.importing;
package com.djrapitops.pluginbridge.plan.importing;
import java.util.UUID;
import main.java.com.djrapitops.plan.data.UserData;
import main.java.com.djrapitops.plan.data.handling.importing.Importer;
import main.java.com.djrapitops.plan.data.handling.info.HandlingInfo;
import main.java.com.djrapitops.plan.data.handling.info.InfoType;
import me.edge209.OnTime.OnTimeAPI;

View File

@ -1,4 +1,4 @@
package main.java.com.djrapitops.plan.data.additional.jobs;
package com.djrapitops.pluginbridge.plan.jobs;
import com.gamingmesh.jobs.Jobs;
import com.gamingmesh.jobs.PlayerManager;

View File

@ -1,8 +1,8 @@
package main.java.com.djrapitops.plan.data.additional.jobs;
package com.djrapitops.pluginbridge.plan.jobs;
import main.java.com.djrapitops.plan.data.additional.Hook;
import main.java.com.djrapitops.plan.api.API;
import main.java.com.djrapitops.plan.data.additional.HookHandler;
import com.djrapitops.pluginbridge.plan.Hook;
import main.java.com.djrapitops.plan.api.API;
/**
* A Class responsible for hooking to Jobs and registering data sources.

View File

@ -1,4 +1,4 @@
package main.java.com.djrapitops.plan.data.additional.jobs;
package com.djrapitops.pluginbridge.plan.jobs;
import com.gamingmesh.jobs.Jobs;
import com.gamingmesh.jobs.PlayerManager;

View File

@ -1,4 +1,4 @@
package main.java.com.djrapitops.plan.data.additional.mcmmo;
package com.djrapitops.pluginbridge.plan.mcmmo;
import com.gmail.nossr50.datatypes.player.PlayerProfile;
import com.gmail.nossr50.datatypes.skills.SkillType;

View File

@ -1,8 +1,8 @@
package main.java.com.djrapitops.plan.data.additional.mcmmo;
package com.djrapitops.pluginbridge.plan.mcmmo;
import main.java.com.djrapitops.plan.data.additional.Hook;
import main.java.com.djrapitops.plan.api.API;
import main.java.com.djrapitops.plan.data.additional.HookHandler;
import com.djrapitops.pluginbridge.plan.Hook;
import main.java.com.djrapitops.plan.api.API;
/**
* A Class responsible for hooking to MCMMO and registering data sources.

View File

@ -3,7 +3,7 @@
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package main.java.com.djrapitops.plan.data.additional.mcmmo;
package com.djrapitops.pluginbridge.plan.mcmmo;
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
import com.gmail.nossr50.datatypes.player.PlayerProfile;

View File

@ -1,8 +1,8 @@
package main.java.com.djrapitops.plan.data.additional.ontime;
package com.djrapitops.pluginbridge.plan.ontime;
import main.java.com.djrapitops.plan.api.API;
import main.java.com.djrapitops.plan.data.additional.Hook;
import main.java.com.djrapitops.plan.data.additional.HookHandler;
import main.java.com.djrapitops.plan.api.API;
import com.djrapitops.pluginbridge.plan.Hook;
/**
* A Class responsible for hooking to OnTime and registering 6 data sources.

View File

@ -1,4 +1,4 @@
package main.java.com.djrapitops.plan.data.additional.ontime;
package com.djrapitops.pluginbridge.plan.ontime;
import java.io.Serializable;
import java.util.UUID;

View File

@ -1,4 +1,4 @@
package main.java.com.djrapitops.plan.data.additional.ontime;
package com.djrapitops.pluginbridge.plan.ontime;
import java.io.Serializable;
import java.util.UUID;

View File

@ -1,4 +1,4 @@
package main.java.com.djrapitops.plan.data.additional.ontime;
package com.djrapitops.pluginbridge.plan.ontime;
import java.io.Serializable;
import java.util.UUID;

View File

@ -1,4 +1,4 @@
package main.java.com.djrapitops.plan.data.additional.ontime;
package com.djrapitops.pluginbridge.plan.ontime;
import java.io.Serializable;
import java.util.UUID;

View File

@ -1,4 +1,4 @@
package main.java.com.djrapitops.plan.data.additional.ontime;
package com.djrapitops.pluginbridge.plan.ontime;
import java.io.Serializable;
import java.util.UUID;

View File

@ -1,4 +1,4 @@
package main.java.com.djrapitops.plan.data.additional.ontime;
package com.djrapitops.pluginbridge.plan.ontime;
import java.io.Serializable;
import java.util.UUID;

View File

@ -1,4 +1,4 @@
package main.java.com.djrapitops.plan.data.additional.towny;
package com.djrapitops.pluginbridge.plan.towny;
import com.palmergames.bukkit.towny.object.Town;
import java.util.Comparator;

View File

@ -1,6 +1,7 @@
package main.java.com.djrapitops.plan.data.additional.towny;
package com.djrapitops.pluginbridge.plan.towny;
import main.java.com.djrapitops.plan.data.additional.Hook;
import main.java.com.djrapitops.plan.data.additional.HookHandler;
import com.djrapitops.pluginbridge.plan.Hook;
import com.palmergames.bukkit.towny.object.Town;
import com.palmergames.bukkit.towny.object.TownyUniverse;
import java.util.Collections;
@ -8,7 +9,6 @@ import java.util.List;
import java.util.stream.Collectors;
import main.java.com.djrapitops.plan.Settings;
import main.java.com.djrapitops.plan.api.API;
import main.java.com.djrapitops.plan.data.additional.HookHandler;
/**
* A Class responsible for hooking to Towny and registering 2 data sources.

View File

@ -1,4 +1,4 @@
package main.java.com.djrapitops.plan.data.additional.towny;
package com.djrapitops.pluginbridge.plan.towny;
import com.massivecraft.factions.entity.MPlayer;
import com.palmergames.bukkit.towny.object.Resident;

View File

@ -1,4 +1,4 @@
package main.java.com.djrapitops.plan.data.additional.towny;
package com.djrapitops.pluginbridge.plan.towny;
import com.palmergames.bukkit.towny.exceptions.NotRegisteredException;
import com.palmergames.bukkit.towny.object.Resident;

View File

@ -1,4 +1,4 @@
package main.java.com.djrapitops.plan.data.additional.vault;
package com.djrapitops.pluginbridge.plan.vault;
import java.io.Serializable;
import java.util.UUID;

View File

@ -1,8 +1,8 @@
package main.java.com.djrapitops.plan.data.additional.vault;
package com.djrapitops.pluginbridge.plan.vault;
import main.java.com.djrapitops.plan.api.API;
import main.java.com.djrapitops.plan.data.additional.Hook;
import com.djrapitops.pluginbridge.plan.Hook;
import main.java.com.djrapitops.plan.data.additional.HookHandler;
import main.java.com.djrapitops.plan.api.API;
import net.milkbowl.vault.economy.Economy;
import static org.bukkit.Bukkit.getServer;