From a3a1b4604f8fe5e5d6a8a2e3c166b07cf330890b Mon Sep 17 00:00:00 2001 From: BenCodez Date: Fri, 13 Dec 2024 09:46:28 -0600 Subject: [PATCH] Add extra check for time queues on proxy --- .../com/bencodez/votingplugin/bungee/VotingPluginBungee.java | 2 +- .../votingplugin/bungee/velocity/VotingPluginVelocity.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/VotingPlugin/src/com/bencodez/votingplugin/bungee/VotingPluginBungee.java b/VotingPlugin/src/com/bencodez/votingplugin/bungee/VotingPluginBungee.java index 60fe0c0f9..d6e63ca75 100644 --- a/VotingPlugin/src/com/bencodez/votingplugin/bungee/VotingPluginBungee.java +++ b/VotingPlugin/src/com/bencodez/votingplugin/bungee/VotingPluginBungee.java @@ -1395,7 +1395,7 @@ public synchronized void vote(String player, String service, boolean realVote, b if (getConfig().getGlobalDataEnabled()) { if (getGlobalDataHandler().isTimeChangedHappened()) { getGlobalDataHandler().checkForFinishedTimeChanges(); - if (timeQueue) { + if (timeQueue && getGlobalDataHandler().isTimeChangedHappened()) { timeChangeQueue.add(new VoteTimeQueue(player, service, LocalDateTime.now().atZone(ZoneId.systemDefault()).toInstant().toEpochMilli())); getLogger().info("Cachcing vote from " + player + "/" + service diff --git a/VotingPlugin/src/com/bencodez/votingplugin/bungee/velocity/VotingPluginVelocity.java b/VotingPlugin/src/com/bencodez/votingplugin/bungee/velocity/VotingPluginVelocity.java index dd4635529..e167878ae 100644 --- a/VotingPlugin/src/com/bencodez/votingplugin/bungee/velocity/VotingPluginVelocity.java +++ b/VotingPlugin/src/com/bencodez/votingplugin/bungee/velocity/VotingPluginVelocity.java @@ -1468,7 +1468,7 @@ public synchronized void vote(String player, String service, boolean realVote, b if (getConfig().getGlobalDataEnabled()) { if (getGlobalDataHandler().isTimeChangedHappened()) { getGlobalDataHandler().checkForFinishedTimeChanges(); - if (timeQueue) { + if (timeQueue && getGlobalDataHandler().isTimeChangedHappened()) { timeChangeQueue.add(new VoteTimeQueue(player, service, LocalDateTime.now().atZone(ZoneId.systemDefault()).toInstant().toEpochMilli())); getLogger().info("Cachcing vote from " + player + "/" + service