diff --git a/VotingPlugin/src/com/bencodez/votingplugin/BungeeHandler.java b/VotingPlugin/src/com/bencodez/votingplugin/BungeeHandler.java index 29d1972cd..1f0658fdb 100644 --- a/VotingPlugin/src/com/bencodez/votingplugin/BungeeHandler.java +++ b/VotingPlugin/src/com/bencodez/votingplugin/BungeeHandler.java @@ -167,6 +167,8 @@ public boolean checkGlobalDataTime(TimeType type, HashMap dat plugin.debug("Detected time change from bungee: " + type.toString()); plugin.getTimeChecker().forceChanged(type, false, true, true); globalDataHandler.setBoolean(plugin.getBungeeSettings().getServer(), type.toString(), false); + getGlobalMessageHandler().sendMessage("TimeChangeFinished", + "" + plugin.getBungeeSettings().getServer()); } } return isProcessing; diff --git a/VotingPlugin/src/com/bencodez/votingplugin/bungee/VotingPluginBungee.java b/VotingPlugin/src/com/bencodez/votingplugin/bungee/VotingPluginBungee.java index 094b7cb8a..24e9f9095 100644 --- a/VotingPlugin/src/com/bencodez/votingplugin/bungee/VotingPluginBungee.java +++ b/VotingPlugin/src/com/bencodez/votingplugin/bungee/VotingPluginBungee.java @@ -876,6 +876,10 @@ protected void onMessage(String channel, String[] message) { if (message[0].equalsIgnoreCase("statusokay")) { String server = message[1]; getLogger().info("Status okay for " + server); + } else if (message[0].equalsIgnoreCase("TimeChangeFinished")) { + if (getConfig().getGlobalDataEnabled()) { + getGlobalDataHandler().checkForFinishedTimeChanges(); + } } else if (message[0].equalsIgnoreCase("login")) { String player = message[1]; String uuid = message[2]; @@ -1183,6 +1187,10 @@ public void onPluginMessage(PluginMessageEvent ev) { String server = in.readUTF(); getLogger().info("Status okay for " + server); return; + } else if (subchannel.equalsIgnoreCase("TimeChangeFinished")) { + if (getConfig().getGlobalDataEnabled()) { + getGlobalDataHandler().checkForFinishedTimeChanges(); + } } else if (subchannel.equalsIgnoreCase("login")) { String player = in.readUTF(); String uuid = in.readUTF(); diff --git a/VotingPlugin/src/com/bencodez/votingplugin/bungee/velocity/VotingPluginVelocity.java b/VotingPlugin/src/com/bencodez/votingplugin/bungee/velocity/VotingPluginVelocity.java index d446d55bf..a708b358c 100644 --- a/VotingPlugin/src/com/bencodez/votingplugin/bungee/velocity/VotingPluginVelocity.java +++ b/VotingPlugin/src/com/bencodez/votingplugin/bungee/velocity/VotingPluginVelocity.java @@ -497,7 +497,12 @@ public void onPluginMessagingReceived(PluginMessageEvent event) { String server = in.readUTF(); logger.info("Status okay for " + server); return; + } else if (subchannel.equalsIgnoreCase("TimeChangeFinished")) { + if (getConfig().getGlobalDataEnabled()) { + getGlobalDataHandler().checkForFinishedTimeChanges(); + } } else if (subchannel.equalsIgnoreCase("login")) { + String player = in.readUTF(); String uuid = in.readUTF(); String serverName = ""; @@ -959,6 +964,10 @@ protected void onMessage(String channel, String[] message) { if (message[0].equalsIgnoreCase("statusokay")) { String server = message[1]; getLogger().info("Status okay for " + server); + } else if (message[0].equalsIgnoreCase("TimeChangeFinished")) { + if (getConfig().getGlobalDataEnabled()) { + getGlobalDataHandler().checkForFinishedTimeChanges(); + } } else if (message[0].equalsIgnoreCase("login")) { String player = message[1]; String uuid = message[2];