From c494215d70cc59653c689df1915db7f95c8ac47d Mon Sep 17 00:00:00 2001 From: Rsl1122 Date: Sun, 26 Nov 2017 14:20:09 +0200 Subject: [PATCH] Removed OnTime support --- PlanPluginBridge/pom.xml | 6 --- .../pluginbridge/plan/jobs/JobsData.java | 2 +- .../pluginbridge/plan/ontime/OnTimeHook.java | 38 ------------- .../pluginbridge/plan/ontime/OntimeRefer.java | 53 ------------------- .../plan/ontime/OntimeReferMonth.java | 53 ------------------- .../plan/ontime/OntimeReferWeek.java | 53 ------------------- .../pluginbridge/plan/ontime/OntimeVotes.java | 53 ------------------- .../plan/ontime/OntimeVotesMonth.java | 53 ------------------- .../plan/ontime/OntimeVotesWeek.java | 53 ------------------- 9 files changed, 1 insertion(+), 363 deletions(-) delete mode 100644 PlanPluginBridge/src/main/java/com/djrapitops/pluginbridge/plan/ontime/OnTimeHook.java delete mode 100644 PlanPluginBridge/src/main/java/com/djrapitops/pluginbridge/plan/ontime/OntimeRefer.java delete mode 100644 PlanPluginBridge/src/main/java/com/djrapitops/pluginbridge/plan/ontime/OntimeReferMonth.java delete mode 100644 PlanPluginBridge/src/main/java/com/djrapitops/pluginbridge/plan/ontime/OntimeReferWeek.java delete mode 100644 PlanPluginBridge/src/main/java/com/djrapitops/pluginbridge/plan/ontime/OntimeVotes.java delete mode 100644 PlanPluginBridge/src/main/java/com/djrapitops/pluginbridge/plan/ontime/OntimeVotesMonth.java delete mode 100644 PlanPluginBridge/src/main/java/com/djrapitops/pluginbridge/plan/ontime/OntimeVotesWeek.java diff --git a/PlanPluginBridge/pom.xml b/PlanPluginBridge/pom.xml index e6f5a59d9..782e69645 100644 --- a/PlanPluginBridge/pom.xml +++ b/PlanPluginBridge/pom.xml @@ -39,12 +39,6 @@ 5.2 provided - - me.edge209 - ontime - 4.1.4 - provided - com.earth2me essentials diff --git a/PlanPluginBridge/src/main/java/com/djrapitops/pluginbridge/plan/jobs/JobsData.java b/PlanPluginBridge/src/main/java/com/djrapitops/pluginbridge/plan/jobs/JobsData.java index bc88d84f8..3ef1f1ea7 100644 --- a/PlanPluginBridge/src/main/java/com/djrapitops/pluginbridge/plan/jobs/JobsData.java +++ b/PlanPluginBridge/src/main/java/com/djrapitops/pluginbridge/plan/jobs/JobsData.java @@ -14,7 +14,7 @@ import java.util.*; import java.util.stream.Collectors; /** - * //TODO Class Javadoc Comment + * PluginData for Jobs plugin. * * @author Rsl1122 */ diff --git a/PlanPluginBridge/src/main/java/com/djrapitops/pluginbridge/plan/ontime/OnTimeHook.java b/PlanPluginBridge/src/main/java/com/djrapitops/pluginbridge/plan/ontime/OnTimeHook.java deleted file mode 100644 index 40ffa2689..000000000 --- a/PlanPluginBridge/src/main/java/com/djrapitops/pluginbridge/plan/ontime/OnTimeHook.java +++ /dev/null @@ -1,38 +0,0 @@ -package com.djrapitops.pluginbridge.plan.ontime; - -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. - * - * @author Rsl1122 - * @since 3.1.0 - */ -public class OnTimeHook extends Hook { - - /** - * Hooks the plugin and registers it's PluginData objects. - * - * API#addPluginDataSource uses the same method from HookHandler. - * - * @param hookH HookHandler instance for registering the data sources. - * @see API - * @throws NoClassDefFoundError when the plugin class can not be found. - */ - public OnTimeHook(HookHandler hookH) { - super("me.edge209.OnTime.OnTime", hookH); - } - - public void hook() throws NoClassDefFoundError { - if (enabled) { - addPluginDataSource(new OntimeVotes()); - addPluginDataSource(new OntimeVotesWeek()); - addPluginDataSource(new OntimeVotesMonth()); - addPluginDataSource(new OntimeRefer()); - addPluginDataSource(new OntimeReferWeek()); - addPluginDataSource(new OntimeReferMonth()); - } - } -} diff --git a/PlanPluginBridge/src/main/java/com/djrapitops/pluginbridge/plan/ontime/OntimeRefer.java b/PlanPluginBridge/src/main/java/com/djrapitops/pluginbridge/plan/ontime/OntimeRefer.java deleted file mode 100644 index 2fe0c661d..000000000 --- a/PlanPluginBridge/src/main/java/com/djrapitops/pluginbridge/plan/ontime/OntimeRefer.java +++ /dev/null @@ -1,53 +0,0 @@ -package com.djrapitops.pluginbridge.plan.ontime; - -import main.java.com.djrapitops.plan.data.additional.AnalysisType; -import main.java.com.djrapitops.plan.data.additional.PluginData; -import me.edge209.OnTime.OnTimeAPI; - -import java.io.Serializable; -import java.util.UUID; - -/** - * PluginData class for Ontime-plugin. - *

- * Registered to the plugin by OnTimeHook - *

- * Gives Total Referral Integer as value. - * - * @author Rsl1122 - * @see OnTimeHook - * @since 3.1.0 - */ -public class OntimeRefer extends PluginData { - - /** - * Class Constructor, sets the parameters of the PluginData object. - */ - public OntimeRefer() { - super("OnTime", "refer", AnalysisType.LONG_TOTAL, AnalysisType.LONG_AVG); - super.setAnalysisOnly(false); - super.setIcon("commenting-o"); - super.setPrefix("Referrals All Time: "); - } - - @Override - public String getHtmlReplaceValue(String modifierPrefix, UUID uuid) { - String name = getNameOf(uuid); - long referTotal = OnTimeAPI.getPlayerTimeData(name, OnTimeAPI.data.TOTALREFER); - if (referTotal == -1) { - return parseContainer(modifierPrefix, "No Referrals."); - } - return parseContainer(modifierPrefix, Long.toString(referTotal)); - } - - @Override - public Serializable getValue(UUID uuid) { - String name = getNameOf(uuid); - long referTotal = OnTimeAPI.getPlayerTimeData(name, OnTimeAPI.data.TOTALREFER); - if (referTotal == -1) { - return -1L; - } - return referTotal; - } - -} diff --git a/PlanPluginBridge/src/main/java/com/djrapitops/pluginbridge/plan/ontime/OntimeReferMonth.java b/PlanPluginBridge/src/main/java/com/djrapitops/pluginbridge/plan/ontime/OntimeReferMonth.java deleted file mode 100644 index 3e7a507a1..000000000 --- a/PlanPluginBridge/src/main/java/com/djrapitops/pluginbridge/plan/ontime/OntimeReferMonth.java +++ /dev/null @@ -1,53 +0,0 @@ -package com.djrapitops.pluginbridge.plan.ontime; - -import main.java.com.djrapitops.plan.data.additional.AnalysisType; -import main.java.com.djrapitops.plan.data.additional.PluginData; -import me.edge209.OnTime.OnTimeAPI; - -import java.io.Serializable; -import java.util.UUID; - -/** - * PluginData class for Ontime-plugin. - * - * Registered to the plugin by OnTimeHook - * - * Gives Months Referral Integer as value. - * - * @author Rsl1122 - * @since 3.1.0 - * @see OnTimeHook - */ -public class OntimeReferMonth extends PluginData { - - /** - * Class Constructor, sets the parameters of the PluginData object. - */ - public OntimeReferMonth() { - super("OnTime", "refer_30d", AnalysisType.LONG_TOTAL); - super.setAnalysisOnly(false); - super.setIcon("commenting-o"); - super.setPrefix("Referrals Last 30d: "); - } - - @Override - public String getHtmlReplaceValue(String modifierPrefix, UUID uuid) { - String name = getNameOf(uuid); - long referTotal = OnTimeAPI.getPlayerTimeData(name, OnTimeAPI.data.MONTHREFER); - if (referTotal == -1) { - return parseContainer(modifierPrefix, "No Referrals."); - } - return parseContainer(modifierPrefix, Long.toString(referTotal)); - } - - @Override - public Serializable getValue(UUID uuid) { - String name = getNameOf(uuid); - long referTotal = OnTimeAPI.getPlayerTimeData(name, OnTimeAPI.data.MONTHREFER); - if (referTotal == -1) { - return -1L; - } - return referTotal; - } - -} diff --git a/PlanPluginBridge/src/main/java/com/djrapitops/pluginbridge/plan/ontime/OntimeReferWeek.java b/PlanPluginBridge/src/main/java/com/djrapitops/pluginbridge/plan/ontime/OntimeReferWeek.java deleted file mode 100644 index ea577462a..000000000 --- a/PlanPluginBridge/src/main/java/com/djrapitops/pluginbridge/plan/ontime/OntimeReferWeek.java +++ /dev/null @@ -1,53 +0,0 @@ -package com.djrapitops.pluginbridge.plan.ontime; - -import main.java.com.djrapitops.plan.data.additional.AnalysisType; -import main.java.com.djrapitops.plan.data.additional.PluginData; -import me.edge209.OnTime.OnTimeAPI; - -import java.io.Serializable; -import java.util.UUID; - -/** - * PluginData class for Ontime-plugin. - * - * Registered to the plugin by OnTimeHook - * - * Gives Week's Referral Integer as value. - * - * @author Rsl1122 - * @since 3.1.0 - * @see OnTimeHook - */ -public class OntimeReferWeek extends PluginData { - - /** - * Class Constructor, sets the parameters of the PluginData object. - */ - public OntimeReferWeek() { - super("OnTime", "refer_7d", AnalysisType.LONG_TOTAL); - super.setAnalysisOnly(false); - super.setIcon("commenting-o"); - super.setPrefix("Referrals Last 7d: "); - } - - @Override - public String getHtmlReplaceValue(String modifierPrefix, UUID uuid) { - String name = getNameOf(uuid); - long referTotal = OnTimeAPI.getPlayerTimeData(name, OnTimeAPI.data.WEEKREFER); - if (referTotal == -1) { - return parseContainer(modifierPrefix, "No Referrals."); - } - return parseContainer(modifierPrefix, Long.toString(referTotal)); - } - - @Override - public Serializable getValue(UUID uuid) { - String name = getNameOf(uuid); - long referTotal = OnTimeAPI.getPlayerTimeData(name, OnTimeAPI.data.WEEKREFER); - if (referTotal == -1) { - return -1L; - } - return referTotal; - } - -} diff --git a/PlanPluginBridge/src/main/java/com/djrapitops/pluginbridge/plan/ontime/OntimeVotes.java b/PlanPluginBridge/src/main/java/com/djrapitops/pluginbridge/plan/ontime/OntimeVotes.java deleted file mode 100644 index 3f29a1620..000000000 --- a/PlanPluginBridge/src/main/java/com/djrapitops/pluginbridge/plan/ontime/OntimeVotes.java +++ /dev/null @@ -1,53 +0,0 @@ -package com.djrapitops.pluginbridge.plan.ontime; - -import main.java.com.djrapitops.plan.data.additional.AnalysisType; -import main.java.com.djrapitops.plan.data.additional.PluginData; -import me.edge209.OnTime.OnTimeAPI; - -import java.io.Serializable; -import java.util.UUID; - -/** - * PluginData class for Ontime-plugin. - * - * Registered to the plugin by OnTimeHook - * - * Gives Total Votes Integer as value. - * - * @author Rsl1122 - * @since 3.1.0 - * @see OnTimeHook - */ -public class OntimeVotes extends PluginData { - - /** - * Class Constructor, sets the parameters of the PluginData object. - */ - public OntimeVotes() { - super("OnTime", "votes", AnalysisType.LONG_TOTAL, AnalysisType.LONG_AVG); - super.setAnalysisOnly(false); - super.setIcon("check"); - super.setPrefix("Votes All Time: "); - } - - @Override - public String getHtmlReplaceValue(String modifierPrefix, UUID uuid) { - String name = getNameOf(uuid); - long votesTotal = OnTimeAPI.getPlayerTimeData(name, OnTimeAPI.data.TOTALVOTE); - if (votesTotal == -1) { - return parseContainer(modifierPrefix, "No votes."); - } - return parseContainer(modifierPrefix, Long.toString(votesTotal)); - } - - @Override - public Serializable getValue(UUID uuid) { - String name = getNameOf(uuid); - long votesTotal = OnTimeAPI.getPlayerTimeData(name, OnTimeAPI.data.TOTALVOTE); - if (votesTotal == -1) { - return -1L; - } - return votesTotal; - } - -} diff --git a/PlanPluginBridge/src/main/java/com/djrapitops/pluginbridge/plan/ontime/OntimeVotesMonth.java b/PlanPluginBridge/src/main/java/com/djrapitops/pluginbridge/plan/ontime/OntimeVotesMonth.java deleted file mode 100644 index 130fdcc17..000000000 --- a/PlanPluginBridge/src/main/java/com/djrapitops/pluginbridge/plan/ontime/OntimeVotesMonth.java +++ /dev/null @@ -1,53 +0,0 @@ -package com.djrapitops.pluginbridge.plan.ontime; - -import main.java.com.djrapitops.plan.data.additional.AnalysisType; -import main.java.com.djrapitops.plan.data.additional.PluginData; -import me.edge209.OnTime.OnTimeAPI; - -import java.io.Serializable; -import java.util.UUID; - -/** - * PluginData class for Ontime-plugin. - * - * Registered to the plugin by OnTimeHook - * - * Gives Month's Votes Integer as value. - * - * @author Rsl1122 - * @since 3.1.0 - * @see OnTimeHook - */ -public class OntimeVotesMonth extends PluginData { - - /** - * Class Constructor, sets the parameters of the PluginData object. - */ - public OntimeVotesMonth() { - super("OnTime", "votes_30d", AnalysisType.LONG_TOTAL); - super.setAnalysisOnly(false); - super.setIcon("check"); - super.setPrefix("Votes Last 30d: "); - } - - @Override - public String getHtmlReplaceValue(String modifierPrefix, UUID uuid) { - String name = getNameOf(uuid); - long votesTotal = OnTimeAPI.getPlayerTimeData(name, OnTimeAPI.data.MONTHVOTE); - if (votesTotal == -1) { - return parseContainer(modifierPrefix, "No votes."); - } - return parseContainer(modifierPrefix, Long.toString(votesTotal)); - } - - @Override - public Serializable getValue(UUID uuid) { - String name = getNameOf(uuid); - long votesTotal = OnTimeAPI.getPlayerTimeData(name, OnTimeAPI.data.MONTHVOTE); - if (votesTotal == -1) { - return -1L; - } - return votesTotal; - } - -} diff --git a/PlanPluginBridge/src/main/java/com/djrapitops/pluginbridge/plan/ontime/OntimeVotesWeek.java b/PlanPluginBridge/src/main/java/com/djrapitops/pluginbridge/plan/ontime/OntimeVotesWeek.java deleted file mode 100644 index 88d96654d..000000000 --- a/PlanPluginBridge/src/main/java/com/djrapitops/pluginbridge/plan/ontime/OntimeVotesWeek.java +++ /dev/null @@ -1,53 +0,0 @@ -package com.djrapitops.pluginbridge.plan.ontime; - -import main.java.com.djrapitops.plan.data.additional.AnalysisType; -import main.java.com.djrapitops.plan.data.additional.PluginData; -import me.edge209.OnTime.OnTimeAPI; - -import java.io.Serializable; -import java.util.UUID; - -/** - * PluginData class for Ontime-plugin. - * - * Registered to the plugin by OnTimeHook - * - * Gives Week's Votes Integer as value. - * - * @author Rsl1122 - * @since 3.1.0 - * @see OnTimeHook - */ -public class OntimeVotesWeek extends PluginData { - - /** - * Class Constructor, sets the parameters of the PluginData object. - */ - public OntimeVotesWeek() { - super("OnTime", "votes_7d", AnalysisType.LONG_TOTAL); - super.setAnalysisOnly(false); - super.setIcon("check"); - super.setPrefix("Votes Last 7d: "); - } - - @Override - public String getHtmlReplaceValue(String modifierPrefix, UUID uuid) { - String name = getNameOf(uuid); - long votesTotal = OnTimeAPI.getPlayerTimeData(name, OnTimeAPI.data.WEEKVOTE); - if (votesTotal == -1) { - return parseContainer(modifierPrefix, "No votes."); - } - return parseContainer(modifierPrefix, Long.toString(votesTotal)); - } - - @Override - public Serializable getValue(UUID uuid) { - String name = getNameOf(uuid); - long votesTotal = OnTimeAPI.getPlayerTimeData(name, OnTimeAPI.data.WEEKVOTE); - if (votesTotal == -1) { - return -1L; - } - return votesTotal; - } - -}