From 4a88b10e61f2bedf702d1d327b85ef1812171dee Mon Sep 17 00:00:00 2001 From: BenCodez Date: Tue, 12 Dec 2023 17:55:32 -0500 Subject: [PATCH] Fix gotten milestones not resetting if per server milestones enabled --- .../bencodez/votingplugin/topvoter/TopVoterHandler.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/VotingPlugin/src/com/bencodez/votingplugin/topvoter/TopVoterHandler.java b/VotingPlugin/src/com/bencodez/votingplugin/topvoter/TopVoterHandler.java index d83a94079..a362ab8e5 100644 --- a/VotingPlugin/src/com/bencodez/votingplugin/topvoter/TopVoterHandler.java +++ b/VotingPlugin/src/com/bencodez/votingplugin/topvoter/TopVoterHandler.java @@ -462,7 +462,14 @@ public void resetMilestoneCount() { } public void resetGottenMilestones() { - plugin.getUserManager().removeAllKeyValues("GottenMileStones", DataType.STRING); + plugin.getUserManager().removeAllKeyValues(getGottenMilestonesPath(), DataType.STRING); + } + + public String getGottenMilestonesPath() { + if (plugin.getBungeeSettings().isPerServerMilestones()) { + return plugin.getBungeeSettings().getServerNameStorage() + "_" + "GottenMilestones"; + } + return "GottenMileStones"; } public void resetVoteShopLimit(String shopIdent) {