diff --git a/VotingPlugin/src/com/bencodez/votingplugin/bungee/VotingPluginBungee.java b/VotingPlugin/src/com/bencodez/votingplugin/bungee/VotingPluginBungee.java index d6e63ca75..36da186ab 100644 --- a/VotingPlugin/src/com/bencodez/votingplugin/bungee/VotingPluginBungee.java +++ b/VotingPlugin/src/com/bencodez/votingplugin/bungee/VotingPluginBungee.java @@ -1173,6 +1173,12 @@ public void login(ProxiedPlayer p) { @Override public void run() { if (isOnline(p)) { + if (getConfig().getGlobalDataEnabled()) { + if (getGlobalDataHandler().isTimeChangedHappened()) { + getGlobalDataHandler().checkForFinishedTimeChanges(); + } + } + checkCachedVotes(server); checkOnlineVotes(proxiedPlayer, proxiedPlayer.getUniqueId().toString(), server); multiProxyHandler.login(proxiedPlayer.getUniqueId().toString(), proxiedPlayer.getName()); diff --git a/VotingPlugin/src/com/bencodez/votingplugin/bungee/velocity/VotingPluginVelocity.java b/VotingPlugin/src/com/bencodez/votingplugin/bungee/velocity/VotingPluginVelocity.java index e167878ae..70ae228a7 100644 --- a/VotingPlugin/src/com/bencodez/votingplugin/bungee/velocity/VotingPluginVelocity.java +++ b/VotingPlugin/src/com/bencodez/votingplugin/bungee/velocity/VotingPluginVelocity.java @@ -543,6 +543,12 @@ public void onPluginMessagingReceived(PluginMessageEvent event) { @Override public void run() { + if (getConfig().getGlobalDataEnabled()) { + if (getGlobalDataHandler().isTimeChangedHappened()) { + getGlobalDataHandler().checkForFinishedTimeChanges(); + } + } + debug("Checking offline votes for " + p.getUsername() + "/" + p.getUniqueId().toString()); checkCachedVotes(server); @@ -1015,6 +1021,12 @@ protected void onMessage(String channel, String[] message) { @Override public void run() { + if (getConfig().getGlobalDataEnabled()) { + if (getGlobalDataHandler().isTimeChangedHappened()) { + getGlobalDataHandler().checkForFinishedTimeChanges(); + } + } + checkCachedVotes(server); checkOnlineVotes(p1, p.getUniqueId().toString(), server); getMultiProxyHandler().login(p1.getUniqueId().toString(),