Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2a889ff2ce | ||
|
|
de9c9185f3 | ||
|
|
07c4534d10 | ||
|
|
b3462bebe6 | ||
|
|
5525a378ae | ||
|
|
bb8588e144 | ||
|
|
8abd596172 | ||
|
|
df93655db3 | ||
|
|
f1f97a8908 | ||
|
|
65fe355d6d |
No files matched your search
@@ -688,6 +688,9 @@ TopVoterIgnorePermission: false
|
||||
# Valid Options: AllTime, Monthly, Weekly, Daily
|
||||
VoteTopDefault: Monthly
|
||||
|
||||
# Whether or not to have ties on top voter rewards
|
||||
TopVoterAwardsTies: true
|
||||
|
||||
# These are required to be enabled in order for top voter awards to work
|
||||
LoadTopVoter:
|
||||
AllTime: true
|
||||
|
||||
@@ -183,6 +183,21 @@ commands:
|
||||
adminvoteplayername:
|
||||
description: Command Alias
|
||||
aliases: avplayername
|
||||
adminvoteResyncMilestones:
|
||||
description: Command Alias
|
||||
aliases: avResyncMilestones
|
||||
adminvoteClearOfflineRewards:
|
||||
description: Command Alias
|
||||
aliases: avClearOfflineRewards
|
||||
adminvoteUserRemove:
|
||||
description: Command Alias
|
||||
aliases: avUserRemove
|
||||
adminvotePurge:
|
||||
description: Command Alias
|
||||
aliases: avPurge
|
||||
adminvoteJavascript:
|
||||
description: Command Alias
|
||||
aliases: avJavascript
|
||||
permissions:
|
||||
VotingPlugin.Player:
|
||||
description: Allows basic access player commands
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>com.Ben12345rocks</groupId>
|
||||
<artifactId>VotingPlugin</artifactId>
|
||||
<version>5.12.3</version>
|
||||
<version>5.12.4</version>
|
||||
<packaging>jar</packaging>
|
||||
<name>VotingPlugin</name>
|
||||
<properties>
|
||||
|
||||
@@ -225,6 +225,21 @@ public class CommandLoader {
|
||||
}
|
||||
});
|
||||
|
||||
plugin.adminVoteCommand.add(new CommandHandler(new String[] { "ResyncMilestones" },
|
||||
"VotingPlugin.Commands.AdminVote.SetResyncMilestones|" + adminPerm, "Resync Milestones") {
|
||||
|
||||
@Override
|
||||
public void execute(CommandSender sender, String[] args) {
|
||||
sendMessage(sender, "&cStarting...");
|
||||
for (String uuid : UserManager.getInstance().getAllUUIDs()) {
|
||||
User user = UserManager.getInstance().getVotingPluginUser(new UUID(uuid));
|
||||
user.setMilestoneCount(user.getAllTimeTotal());
|
||||
}
|
||||
sendMessage(sender, "&cFinished");
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
plugin.adminVoteCommand.add(new CommandHandler(new String[] { "AddPoints", "(player)", "(number)" },
|
||||
"VotingPlugin.Commands.AdminVote.AddPoints|" + adminPerm, "Add to players voting points") {
|
||||
|
||||
|
||||
@@ -387,7 +387,7 @@ public class PlayerGUIs {
|
||||
|
||||
@Override
|
||||
public void onClick(ClickEvent clickEvent) {
|
||||
//ItemBuilder item = new ItemBuilder(clickEvent.getClickedItem());
|
||||
// ItemBuilder item = new ItemBuilder(clickEvent.getClickedItem());
|
||||
// String name = ChatColor.stripColor(item.getName()).split(":")[1].trim();
|
||||
String name = (String) clickEvent.getButton().getData("player");
|
||||
|
||||
@@ -518,7 +518,6 @@ public class PlayerGUIs {
|
||||
|
||||
for (VoteSite voteSite : plugin.getVoteSites()) {
|
||||
ItemBuilder builder = new ItemBuilder(Config.getInstance().getVoteURLAlreadyVotedItemSection());
|
||||
|
||||
if (user.canVoteSite(voteSite)) {
|
||||
builder = new ItemBuilder(Config.getInstance().getVoteURLCanVoteItemSection());
|
||||
} else {
|
||||
|
||||
@@ -1482,4 +1482,8 @@ public class Config extends YMLFile {
|
||||
return getData().getBoolean("ClearCacheOnVote");
|
||||
}
|
||||
|
||||
public boolean getTopVoterAwardsTies() {
|
||||
return getData().getBoolean("TopVoterAwardsTies", true);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -66,7 +66,7 @@ public class VotiferEvent implements Listener {
|
||||
services.add(site.getServiceSite());
|
||||
}
|
||||
plugin.getLogger()
|
||||
.warning("Current service sites: " + ArrayUtils.getInstance().makeStringList(services));
|
||||
.warning("Current known service sites: " + ArrayUtils.getInstance().makeStringList(services));
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -286,7 +286,7 @@ public class Main extends JavaPlugin {
|
||||
}
|
||||
|
||||
private void loadTimer() {
|
||||
Bukkit.getScheduler().runTaskAsynchronously(plugin, new Runnable() {
|
||||
Bukkit.getScheduler().runTaskLaterAsynchronously(plugin, new Runnable() {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
@@ -298,7 +298,7 @@ public class Main extends JavaPlugin {
|
||||
}
|
||||
}, 1000, 1000 * 60 * Config.getInstance().getDelayBetweenUpdates());
|
||||
}
|
||||
});
|
||||
}, 40L);
|
||||
|
||||
}
|
||||
|
||||
@@ -534,7 +534,7 @@ public class Main extends JavaPlugin {
|
||||
|
||||
@Override
|
||||
public String getValue() {
|
||||
return Config.getInstance().getDataStorage();
|
||||
return Config.getInstance().getDataStorage().toUpperCase();
|
||||
}
|
||||
});
|
||||
metrics.addCustomChart(new BStatsMetrics.SimplePie("DisableCheckOnWorldChange") {
|
||||
|
||||
@@ -116,7 +116,11 @@ public class TopVoterHandler implements Listener {
|
||||
int lastTotal = -1;
|
||||
for (User user : plugin.topVoterDaily.keySet()) {
|
||||
if (!Config.getInstance().getTopVoterIgnorePermission() || !user.isTopVoterIgnore()) {
|
||||
if (user.getDailyTotal() != lastTotal) {
|
||||
if (Config.getInstance().getTopVoterAwardsTies()) {
|
||||
if (user.getDailyTotal() != lastTotal) {
|
||||
i++;
|
||||
}
|
||||
} else {
|
||||
i++;
|
||||
}
|
||||
if (places.contains(Integer.toString(i))) {
|
||||
@@ -158,7 +162,11 @@ public class TopVoterHandler implements Listener {
|
||||
for (User user : plugin.topVoterMonthly.keySet()) {
|
||||
|
||||
if (!Config.getInstance().getTopVoterIgnorePermission() || !user.isTopVoterIgnore()) {
|
||||
if (user.getMonthTotal() != lastTotal) {
|
||||
if (Config.getInstance().getTopVoterAwardsTies()) {
|
||||
if (user.getMonthTotal() != lastTotal) {
|
||||
i++;
|
||||
}
|
||||
} else {
|
||||
i++;
|
||||
}
|
||||
if (places.contains(Integer.toString(i))) {
|
||||
@@ -208,7 +216,11 @@ public class TopVoterHandler implements Listener {
|
||||
int lastTotal = -1;
|
||||
for (User user : plugin.topVoterWeekly.keySet()) {
|
||||
if (!Config.getInstance().getTopVoterIgnorePermission() || !user.isTopVoterIgnore()) {
|
||||
if (user.getWeeklyTotal() != lastTotal) {
|
||||
if (Config.getInstance().getTopVoterAwardsTies()) {
|
||||
if (user.getWeeklyTotal() != lastTotal) {
|
||||
i++;
|
||||
}
|
||||
} else {
|
||||
i++;
|
||||
}
|
||||
if (places.contains(Integer.toString(i))) {
|
||||
|
||||
Reference in new issue
Block a user