diff --git a/VotingPlugin/pom.xml b/VotingPlugin/pom.xml
index 69dfa8af0..88c626ef2 100644
--- a/VotingPlugin/pom.xml
+++ b/VotingPlugin/pom.xml
@@ -2,7 +2,7 @@
4.0.0
com.bencodez
${version.art}
- 6.14
+ 6.14.1
jar
VotingPlugin
diff --git a/VotingPlugin/src/com/bencodez/votingplugin/cooldown/CoolDownCheck.java b/VotingPlugin/src/com/bencodez/votingplugin/cooldown/CoolDownCheck.java
index b6fc574c8..895ed59c6 100644
--- a/VotingPlugin/src/com/bencodez/votingplugin/cooldown/CoolDownCheck.java
+++ b/VotingPlugin/src/com/bencodez/votingplugin/cooldown/CoolDownCheck.java
@@ -1,7 +1,5 @@
package com.bencodez.votingplugin.cooldown;
-import java.time.Duration;
-import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map.Entry;
@@ -35,8 +33,6 @@ public class CoolDownCheck implements Listener {
private HashMap> allSiteTasks = new HashMap>();
- private HashMap> voteSiteChecks = new HashMap>();
-
public CoolDownCheck(VotingPluginMain plugin) {
this.plugin = plugin;
this.timer = Executors.newScheduledThreadPool(1);
@@ -183,49 +179,6 @@ public void onFinish() {
}
});
- //scheduleGlobalCheckVoteSite();
- }
-
- public void scheduleGlobalCheckVoteSite() {
- if (plugin.getConfigFile().isPerSiteCoolDownEvents()) {
- for (VoteSite site : plugin.getVoteSites()) {
- scheduleGlobalCheckVoteSite(site);
- }
- }
- }
-
- public void scheduleGlobalCheckVoteSite(VoteSite site) {
- if (voteSiteChecks.containsKey(site.getKey())) {
- voteSiteChecks.get(site.getKey()).cancel(false);
- voteSiteChecks.remove(site.getKey());
- }
- if (site.isVoteDelayDaily()) {
- LocalDateTime resetTime = plugin.getTimeChecker().getTime().withHour(site.getVoteDelayDailyHour())
- .withMinute(0).withSecond(0);
- LocalDateTime resetTimeTomorrow = resetTime.plusHours(24);
- long time = 0;
- LocalDateTime now = plugin.getTimeChecker().getTime();
- if (now.isBefore(resetTime)) {
- Duration dur = Duration.between(now, resetTime);
- time = dur.getSeconds();
- } else if (now.isBefore(resetTimeTomorrow)) {
- Duration dur = Duration.between(now, resetTimeTomorrow);
- time = dur.getSeconds();
- }
-
- ScheduledFuture> scheduledFuture = timer.schedule(new Runnable() {
-
- @Override
- public void run() {
- checkAllVoteSite(site);
- }
- }, time + 90, TimeUnit.SECONDS);
- plugin.getLogger().info(
- "Checking vote delay daily cooldown events/rewards in " + time + " seconds for " + site.getKey());
-
- voteSiteChecks.put(site.getKey(), scheduledFuture);
- }
-
}
public void checkAllVoteSite(VoteSite site) {
@@ -251,8 +204,6 @@ public void checkAllVoteSite(VoteSite site) {
cols = null;
plugin.getLogger().info("Finished checking vote cooldown rewards for all players: " + site.getKey());
- //scheduleGlobalCheckVoteSite(site);
-
}
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
diff --git a/VotingPlugin/src/com/bencodez/votingplugin/objects/VoteSite.java b/VotingPlugin/src/com/bencodez/votingplugin/objects/VoteSite.java
index 4dc8e7778..eb3a902e1 100644
--- a/VotingPlugin/src/com/bencodez/votingplugin/objects/VoteSite.java
+++ b/VotingPlugin/src/com/bencodez/votingplugin/objects/VoteSite.java
@@ -247,7 +247,7 @@ public String loadingDebug() {
str += ", VoteDelayDaily: " + isVoteDelayDaily();
str += ", IsWaitUntilVoteDelay: " + isWaitUntilVoteDelay();
str += ", ServiceSite: " + getServiceSite();
- str += ", TimeOffSet:" + getVoteDelayDailyHour();
+ str += ", VoteDelayDailyHour:" + getVoteDelayDailyHour();
str += ", Url: " + getVoteURL();
str += ", IgnoreCanVote: " + isIgnoreCanVote();
str += ", Hidden: " + isHidden();