Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a545462410 | ||
|
|
bb7cc4d6e7 | ||
|
|
eb69cf41a5 | ||
|
|
642164b1b4 | ||
|
|
ff99a462d7 | ||
|
|
e7de87e8aa | ||
|
|
e5d91037cb | ||
|
|
e7db5b8aa2 | ||
|
|
551c962cd2 | ||
|
|
5ada4e05a2 | ||
|
|
1f3243e362 |
No files matched your search
@@ -817,6 +817,13 @@ DisabledCommands: []
|
||||
# Enable to true for extra player checks
|
||||
ExtraBackgroundUpdate: false
|
||||
|
||||
# This will prevent spam clicking GUI's to prevent exploits
|
||||
# Number is time in between clicking in milliseconds
|
||||
SpamClickTime: 350
|
||||
# Message to send when inventory forced closed when spam clicking
|
||||
# Uncomment to use
|
||||
#SpamClickMessage: '&cDetected spam clicking GUI, closing to prevent exploits'
|
||||
|
||||
# ---------------------------------------------------------
|
||||
# Mysql cache options
|
||||
# Clearing cache forces the plugin to pull from database
|
||||
|
||||
@@ -195,9 +195,6 @@ commands:
|
||||
adminvoteForceVoteParty:
|
||||
description: Command Alias
|
||||
aliases: avForceVoteParty
|
||||
adminvoteUserEditValue:
|
||||
description: Command Alias
|
||||
aliases: avUserEditValue
|
||||
adminvoteSetRequestMethod:
|
||||
description: Command Alias
|
||||
aliases: avSetRequestMethod
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>com.Ben12345rocks</groupId>
|
||||
<artifactId>VotingPlugin</artifactId>
|
||||
<version>5.23.2</version>
|
||||
<version>5.23.3</version>
|
||||
<packaging>jar</packaging>
|
||||
<name>VotingPlugin</name>
|
||||
<properties>
|
||||
|
||||
@@ -1125,6 +1125,19 @@ public class CommandLoader {
|
||||
}
|
||||
});
|
||||
|
||||
plugin.getAdminVoteCommand()
|
||||
.add(new CommandHandler(new String[] { "User", "(player)", "ForceVoteShop", "(VoteShop)" },
|
||||
"VotingPlugin.Commands.AdminVote.ForceVoteShop|" + adminPerm, "Force a voteshop reward") {
|
||||
|
||||
@Override
|
||||
public void execute(CommandSender sender, String[] args) {
|
||||
User user = UserManager.getInstance().getVotingPluginUser(args[1]);
|
||||
RewardHandler.getInstance().giveReward(user, Config.getInstance().getData(),
|
||||
Config.getInstance().getIdentifierRewardsPath(args[3]), new RewardOptions());
|
||||
sendMessage(sender, "&cVoteShop " + args[3] + " forced");
|
||||
}
|
||||
});
|
||||
|
||||
plugin.getAdminVoteCommand()
|
||||
.add(new CommandHandler(new String[] { "User", "(player)", "ForceMilestone", "(Number)" },
|
||||
"VotingPlugin.Commands.AdminVote.ForceMilestone|" + adminPerm, "Force a milestone") {
|
||||
@@ -1343,7 +1356,8 @@ public class CommandLoader {
|
||||
Player player = event.getWhoClicked();
|
||||
String playerName = (String) event.getMeta(player, "Player");
|
||||
BInventory inv = new BInventory("MileStones: " + playerName);
|
||||
for (String mileStoneName : SpecialRewardsConfig.getInstance().getMilestoneVotes()) {
|
||||
for (String mileStoneName : SpecialRewardsConfig.getInstance()
|
||||
.getMilestoneVotes()) {
|
||||
if (StringParser.getInstance().isInt(mileStoneName)) {
|
||||
int mileStone = Integer.parseInt(mileStoneName);
|
||||
|
||||
@@ -1430,6 +1444,22 @@ public class CommandLoader {
|
||||
public void updateReplacements() {
|
||||
}
|
||||
});
|
||||
|
||||
TabCompleteHandler.getInstance().addTabCompleteOption(new TabCompleteHandle("(VoteShop)", sites) {
|
||||
|
||||
@Override
|
||||
public void reload() {
|
||||
ArrayList<String> sites = new ArrayList<String>();
|
||||
for (String str : Config.getInstance().getIdentifiers()) {
|
||||
sites.add(str);
|
||||
}
|
||||
setReplace(sites);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateReplacements() {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2251,7 +2281,7 @@ public class CommandLoader {
|
||||
User user = UserManager.getInstance().getVotingPluginUser((Player) sender);
|
||||
user.sendMessage(Commands.getInstance().voteURLs(user, true));
|
||||
} else {
|
||||
sender.sendMessage(Commands.getInstance().voteURLs(null, true));
|
||||
sender.sendMessage(Commands.getInstance().voteURLs(null, false));
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -205,12 +205,13 @@ public class VoteParty implements Listener {
|
||||
}
|
||||
|
||||
if (SpecialRewardsConfig.getInstance().getVotePartyGiveAllPlayers()) {
|
||||
plugin.debug("Giving all players vote party");
|
||||
plugin.debug("Trying to give all players vote party");
|
||||
for (String uuid : UserManager.getInstance().getAllUUIDs()) {
|
||||
User user = UserManager.getInstance().getVotingPluginUser(new UUID(uuid));
|
||||
giveReward(user);
|
||||
}
|
||||
} else {
|
||||
plugin.debug("Trying to give all online players vote party");
|
||||
plugin.debug(ArrayUtils.getInstance().makeStringList(getVotedUsers()));
|
||||
for (String uuid : getVotedUsers()) {
|
||||
User user = UserManager.getInstance().getVotingPluginUser(new UUID(uuid));
|
||||
|
||||
@@ -58,7 +58,7 @@ public class VoteReminding {
|
||||
|
||||
if (PlayerUtils.getInstance().hasServerPermission(playerName, "VotingPlugin.Login.RemindVotes")
|
||||
|| PlayerUtils.getInstance().hasServerPermission(playerName, "VotingPlugin.Player")) {
|
||||
if (user.canVoteAll()) {
|
||||
if (user.canVoteAll() || (user.canVoteAny() && user.hasPermission("VotingPlugin.Login.RemindVotes.Any"))) {
|
||||
Player player = Bukkit.getPlayer(playerName);
|
||||
if (player != null) {
|
||||
if (!Config.getInstance().getVoteRemindingRemindOnlyOnce()) {
|
||||
|
||||
@@ -319,6 +319,10 @@ public class Bungee extends Plugin implements net.md_5.bungee.api.plugin.Listene
|
||||
}
|
||||
|
||||
public void vote(String player, String service, boolean realVote) {
|
||||
if (player == null || player.isEmpty()) {
|
||||
getLogger().info("No name from vote on " + service);
|
||||
return;
|
||||
}
|
||||
if (method.equals(BungeeMethod.SOCKETS)) {
|
||||
sendSocketVote(player, service);
|
||||
} else if (method.equals(BungeeMethod.PLUGINMESSAGING)) {
|
||||
|
||||
Reference in new issue
Block a user