Vote
[1.12.2][Spigot][Bukkit] Kick, ban, restart, rain, sun, day, night, and custom votes. A simple to use and lightweight voting system with a little more functionality than the others. You can create votes that run commands on other plugins, as well as customize each vote to your hearts desire.
seewind has made a tutorial video for all the German fans of the plugin!
seewind has made a tutorial video for all the German fans of the plugin!
Features
- Allows you to create your own votes
- You can specify what command(s) to execute and in what order for both a successful and failed vote
- Fully implements Permissions using Vault, but can also default to regular Bukkit permissions
- You can choose what percentage it takes for a vote to succeed, and the minimum number of players it takes to succeed for each type of vote
- Fully customizable notifications
- Messages can be fully colorized to your hearts desire. Every single message/notification is located and editable in the config.yml
- You can pass any number of parameters you want
- Default votes are: Day, night, sun, rain, kick, and ban
- Source is available here
Configuration
Place the Vote.jar in the plugins folder. The configuration file will be created when the server is started. Make sure to have someone, doesn't matter who, as an op or it will shut down on load. The general overview of the config.yml custom commands is located here. You can read about how arguments work in Vote here. You can read about commands specific to Vote here. You can also watch the tutorial on how to create your own votes.Commands
All commands start with /vote- /vote yes/y - Votes yes on the active vote
- /vote no/n - Votes no on the active vote
- /vote [votename] - "/vote restart" will start a vote to restart the server. /vote kick rabidcrab will start a vote to kick rabidcrab
- /vote veto - Immediately cancels a vote.
- /vote reload - Reload the plugin, cancelling any outstanding vote commands, cancelling any active vote, and reloading the config file.
Permissions
If permissions are not enabled, everyone has the ability to start votes and vote.- vote.voteyes.[votename] - Allows the user or group to vote yes on [votename]. I.E vote.voteyes.restart will allow the player to vote for a restart
- vote.voteyes.* allows a player to vote yes for all votes
- vote.voteno.[votename] - Same as vote.voteyes.[votename], except for voting no
- vote.startvote.[votename] - vote.startvote.* for all, or vote.startvote.restart for restart, etc.
- vote.setvalue - The plugin runs it's own commands when voting for rain or sun. You need this permission on all admins for sun and rain votes to work correctly.
- vote.unkickable - Makes the player un-kickable
- vote.unbannable - Makes the player un-bannable
- vote.veto- Allows the player to cancel votes
- vote.reload- Reloads the plugin
@RabidCrab
Tried, dosen't work.
@Arton123
Do the players in question have permission to vote? If not, it doesn't count them in the minimum vote check.
@RabidCrab
Thanks its fixed now!
Im using 1.4.7 verison of this plugin and all the votes on my server fails, even if there is a higher number voting yes or no.
@killerdiablos321
When you start a vote, it puts you into the yes vote slot. If there's no one else online, and the minimum votes is set at 1, it succeeds.
The plugin sees you as having a 100% vote chance success so it's just succeeding it for you. If you use an alt account to log in, it won't automatically succeed.
Alternatively, if you are the only one online, you start a vote, and the minimum votes is 2 or more, it will automatically fail.
@RabidCrab
If you look in my comment i said "I made this a console command and tested it and it works" When i get the mail it says its from Console so that works fine, I just don't know why it automatically says "Vote Succeeded" when i start a custom vote. I made one before that and it said the same thing but this one was for promoting someone (Just a Test) and it said the same thing, "Vote Succeeded" right after i started the vote. I Did watch your video on how to make a custom vote and followed all those instructions so idk what is wrong. May be a bug? Oh and When it says "Vote Succeeded" right after i start that vote, it actually does the command so its not like a bug that just shows the message. All the other Votes work like day and restart and such (Default ones) but not the custom ones i make.
@killerdiablos321
Try setting IsConsoleCommand to false. The mail command probably requires that a player mails someone.
And easy way to see if you need IsConsoleCommand on or off is to try and execute the commands in the server console. If they don't work, then IsConsoleCommand needs to be false. If they work fine, keep it to true.
@UnitedFactions
MinimumVotes: - This does not include people who do not vote. This means that if you put it at 10, at least 10 players need to vote either yes or no. If there are not even 10 people online, it will instantly fail. IgnoreUnvotedPlayers - Ignoring unvoted players means that it will not take them into account for the vote. If it's yes, unvoted players will be counted as a no vote. IsConsoleCommand - Is console command should be default to true unless the command fails to run. It's somewhat complex. TimeoutSeconds: - Timeout will only be created if the vote fails or succeeds. On an instant cancel, it doesn't timeout.
Your vote is instantly failing because there's not enough people online for it to possibly succeed.
@killerdiablos321
same issue yea =/ and Rabid isnt replying.
@UnitedFactions
I have the same problem http:pastebin.com/mrTfF1h1
That is my config.yml
My vote works like this...
Someone doesn't like a certain plugin, so they make a vote to remove the plugin with /vote removeplugin [PluginName] [Reason] And if the vote succeeds then it will send me mail saying Please Remove [PluginName] From PulsePvp because its [Reason] I made this a console command and tested it and it works, except as soon as i start a vote it says vote succeeded! It doesn't give anyone time to vote.
Please help!
can you work for the custom votes? i need it very fast
@DerSeegler
Okay so, RabidCrab,
I been trying to get this working for at least 40 minutes... I tried everything but nothing will work.
What happens:
1. I start a vote to jail hugobos1.
2. At that moment, it tells me the vote failed, and stops. However all my settings are correct. The vote will only work when I set minimal votes to 1.
There are 38 people online, these are my settings: http://pastebin.com/raw.php?i=fjwdeCSk
and:
jail:
Description: 'jail a player'
ArgumentCount: 1
InsufficientArgumentsError: '&CIncorrect arguments! You need to do /Vote jail PLAYERNAME'
VoteStartText: '&A[%1] has started a vote to jail &C[%0]&A! Type &6/vote yes &Aor &6/vote no &Ato vote'
TimeoutSeconds: 120
VoteOnCooldownText: '&CA player has been jailed too recently!'
VoteSuccessText: '&AVote succeeded! &C[%0] &Ahas been jailed'
VoteSuccessCommandDelaySeconds: 0
VoteSuccessCommands:
- FINDPLAYER[%0]
- VERIFYPLAYERONLINE [%0]
- jail [%0] jail1 1d
CooldownMinutesToSuccessRevote: 15
VoteFailText: '&AVote to jail &C[%0] &Afailed!'
VoteFailCommandDelaySeconds: 0
VoteFailCommands: []
CooldownMinutesToFailRevote: 30
MinimumVotes: 10
PercentToSucceed: 50
IgnoreUnvotedPlayers: true
IsConsoleCommand: false
LastSuccessfulVote: 0
LastFailedVote: 0
Also, I tried changing the minimumvotes from 20 to 10. I have a few questions still, that are not explained very well in the pages etc.
MinimumVotes: - Does this include people who do not vote?
IgnoreUnvotedPlayers - If No? Will they always vote NO or something? Its not clear?!
IsConsoleCommand - No? What is this? What do you mean?
TimeoutSeconds: - The vote gets instantly canceled, and does not have a time out of 120 seconds.
I tried rebooting and everything nothing will work =/ HELP!
Hey, the Plugin isnt using the permissions, do i have to enable it somewhere or is GroupManager not supported?
I need some help when i start my server it says this,[Vote] has been disabled no op found.[Vote] Disabling Vote v1.5.1_01[Vote] has been disabled-Fixed thx anyway
@Adrenalineq
The "risky" async call it refers to has no potential for failure so I'm not sure why it's warning you it's a risky call.
The line of code it references is this: ((Player)sender).getWorld().setTime(Long.parseLong(args[2]));
All of the parameters in question exist within the instance of the called thread and do not reference an external parameter that can possibly exist outside of the executing thread. It may be possible in another language, but Java passes objects by reference (sender) until edited, in which a bit copy is made, strings are always thread safe (commandName), even when edited outside the declaring thread, and arrays (args) are thread safe if the array of objects are thread safe, which they are String, which infers thread safety.
EDIT: It's likely that your monitoring app doesn't like that I execute code off of a Timer. A Timer will create a new thread and execute the code on there. There's no real risk to this, and is used often, so you'll have to talk to the dev who made the monitoring app to find out why he/she is not accounting for an async thread that only references thread-safe objects.
@RabidCrab
Issue; https://github.com/RabidCrab/Minecraft.Vote/issues/2
@arhtech
It's currently not possible to do, but you can remove the name of the person who starts the vote in the announcement. The player would still see they're up for a vote to be banned, but they wouldn't know who started it.
QUESTION: Can I set a vote to be hidden from the target player? What I want to avoid is bad feelings if a ban vote is called and the vote fails. Then the caller of the vote and the target hate each other and bad things ensue.
In other words, I don't want the person being banned to know the vote was called unless they are actually banned. Thanks!
please add Notification support :D
I have deleted "vote setvalue" and the command is "tp [%0] 35 35 35" and then it has been succeed...I don't know what to say...I was been misinformed...