From 2a008906f40f1904d727fb140ca7b7d001427457 Mon Sep 17 00:00:00 2001 From: NorbiPeti Date: Sat, 31 Oct 2020 18:24:18 +0100 Subject: [PATCH] Remove Votifier component and stuff --- Chroma-Core/pom.xml | 2 +- .../java/buttondevteam/core/MainPlugin.java | 5 +- .../component/votifier/VotifierComponent.java | 49 ------------------- Chroma-Core/src/main/resources/plugin.yml | 4 -- 4 files changed, 3 insertions(+), 57 deletions(-) delete mode 100644 Chroma-Core/src/main/java/buttondevteam/core/component/votifier/VotifierComponent.java diff --git a/Chroma-Core/pom.xml b/Chroma-Core/pom.xml index bfb28ab..3fe75f1 100755 --- a/Chroma-Core/pom.xml +++ b/Chroma-Core/pom.xml @@ -219,7 +219,7 @@ github UTF-8 - 1.0.0 + 1.0.1 https://github.com/TBMCPlugins/mvn-repo diff --git a/Chroma-Core/src/main/java/buttondevteam/core/MainPlugin.java b/Chroma-Core/src/main/java/buttondevteam/core/MainPlugin.java index bc42ac8..4d2543b 100755 --- a/Chroma-Core/src/main/java/buttondevteam/core/MainPlugin.java +++ b/Chroma-Core/src/main/java/buttondevteam/core/MainPlugin.java @@ -8,7 +8,6 @@ import buttondevteam.core.component.randomtp.RandomTPComponent; import buttondevteam.core.component.restart.RestartComponent; import buttondevteam.core.component.spawn.SpawnComponent; import buttondevteam.core.component.towny.TownyComponent; -import buttondevteam.core.component.votifier.VotifierComponent; import buttondevteam.lib.TBMCCoreAPI; import buttondevteam.lib.architecture.ButtonPlugin; import buttondevteam.lib.architecture.Component; @@ -101,8 +100,8 @@ public class MainPlugin extends ButtonPlugin { Component.registerComponent(this, new SpawnComponent()); if (Bukkit.getPluginManager().isPluginEnabled("Towny")) //It fails to load the component class otherwise Component.registerComponent(this, new TownyComponent()); - if (Bukkit.getPluginManager().isPluginEnabled("Votifier") && economy != null) - Component.registerComponent(this, new VotifierComponent(economy)); + /*if (Bukkit.getPluginManager().isPluginEnabled("Votifier") && economy != null) + Component.registerComponent(this, new VotifierComponent(economy));*/ ComponentManager.enableComponents(); registerCommand(new ComponentCommand()); registerCommand(new ChromaCommand()); diff --git a/Chroma-Core/src/main/java/buttondevteam/core/component/votifier/VotifierComponent.java b/Chroma-Core/src/main/java/buttondevteam/core/component/votifier/VotifierComponent.java deleted file mode 100644 index adb1f0c..0000000 --- a/Chroma-Core/src/main/java/buttondevteam/core/component/votifier/VotifierComponent.java +++ /dev/null @@ -1,49 +0,0 @@ -package buttondevteam.core.component.votifier; - -import buttondevteam.core.MainPlugin; -import buttondevteam.lib.architecture.Component; -import buttondevteam.lib.architecture.ComponentMetadata; -import buttondevteam.lib.architecture.ConfigData; -import com.vexsoftware.votifier.model.Vote; -import com.vexsoftware.votifier.model.VotifierEvent; -import lombok.RequiredArgsConstructor; -import net.milkbowl.vault.economy.Economy; -import org.bukkit.Bukkit; -import org.bukkit.entity.Player; -import org.bukkit.event.EventHandler; - -/** - * Do not use (EULA) - */ -@RequiredArgsConstructor -@ComponentMetadata(enabledByDefault = false) -public class VotifierComponent extends Component { - private final Economy economy; - - private final ConfigData rewardAmount = getConfig().getData("rewardAmount", 0.0); - - @Override - protected void enable() { - - } - - @Override - protected void disable() { - - } - - @EventHandler - @SuppressWarnings("deprecation") - public void onVotifierEvent(VotifierEvent event) { - Vote vote = event.getVote(); - log("Vote: " + vote); - org.bukkit.OfflinePlayer op = Bukkit.getOfflinePlayer(vote.getUsername()); - Player p = Bukkit.getPlayer(vote.getUsername()); - /*if (op != null) { - economy.depositPlayer(op, rewardAmount().get()); - } - if (p != null) { - p.sendMessage("§bThanks for voting! $50 was added to your account."); - }*/ - } -} diff --git a/Chroma-Core/src/main/resources/plugin.yml b/Chroma-Core/src/main/resources/plugin.yml index 2be250e..23f5826 100755 --- a/Chroma-Core/src/main/resources/plugin.yml +++ b/Chroma-Core/src/main/resources/plugin.yml @@ -9,10 +9,6 @@ commands: description: Schedules a restart for a given time. primerestart: description: Restarts the server as soon as nobody is online. - randomtp: - description: teleport player to random location within world border. Every five players teleport to the same general area, and then a new general area is randomly selected for the next five players. - member: - description: Add or remove a member component: description: Enable or disable or list components dontrunthiscmd: