diff --git a/VotingPlugin/src/com/bencodez/votingplugin/bungee/VotingPluginBungee.java b/VotingPlugin/src/com/bencodez/votingplugin/bungee/VotingPluginBungee.java index e4bd89656..5a0b8c022 100644 --- a/VotingPlugin/src/com/bencodez/votingplugin/bungee/VotingPluginBungee.java +++ b/VotingPlugin/src/com/bencodez/votingplugin/bungee/VotingPluginBungee.java @@ -807,6 +807,9 @@ public void run() { debug("Checking nonvotedplayers.yml..."); nonVotedPlayersCache.check(); } + if (voteCacheFile != null) { + voteCacheFile.save(); + } } }, 1l, 60l, TimeUnit.MINUTES); } else if (method.equals(BungeeMethod.SOCKETS)) { diff --git a/VotingPlugin/src/com/bencodez/votingplugin/bungee/velocity/VotingPluginVelocity.java b/VotingPlugin/src/com/bencodez/votingplugin/bungee/velocity/VotingPluginVelocity.java index f3daaaf62..e5e5691d3 100644 --- a/VotingPlugin/src/com/bencodez/votingplugin/bungee/velocity/VotingPluginVelocity.java +++ b/VotingPlugin/src/com/bencodez/votingplugin/bungee/velocity/VotingPluginVelocity.java @@ -881,6 +881,9 @@ public void debug(String text) { debug("Checking nonvotedplayerscache.yml..."); nonVotedPlayersCache.check(); } + if (voteCacheFile != null) { + voteCacheFile.save(); + } }).delay(1L, TimeUnit.MINUTES).repeat(60l, TimeUnit.MINUTES).schedule(); } else if (method.equals(BungeeMethod.SOCKETS)) { encryptionHandler = new EncryptionHandler(new File(dataDirectory.toFile(), "secretkey.key"));