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
I use the latest compiled Spigot 1.9 and an updated Essentials/GroupManager fork by DRTSHOCK ( https://ci.drtshock.net/job/EssentialsX/ ). I also use Vault.
With the default configuration everyone can init a vote but when adding negated permission nodes to my guest and prisoner ranks, they can still start votes :S
@CloudeLecaw
I uploaded a version that will work with CraftBukkit and Spigot 1.9, pending approval.
Check back in a few hours from this post and it should be live.
@CloudeLecaw
I'll take a look and see what it'll take to port it to Spigot. It wasn't originally part of the plan to do so, but I imagine it won't be a ton of work if it worked on previous versions of Spigot.
This project is mostly inactive because Bukkit itself shut down, but I don't see why I can't at least take a look and see what I'd need to do to fix it if people are still using this plugin.
Can you add a vote for mute?
Can you update this and move it on Spigot please?
how do I disable permissions all together I get Vault not detected for permissions, defaulting to Bukkit Permissions but still players can't /vote kick
RabidCrab. I want to inform you of a problem in your plugin, and how to fix it.
recently bukkit changed the return of the getOnlinePlayers() method. this has caused votes to fail if anyone votes no, regardless of % setting in the config. what you must do to fix this is replace
"List<Player> allLoggedInPlayers = new ArrayList<Player>(Arrays.asList(plugin.getServer().getOnlinePlayers()));"
on row 174 in src.me.RabidCrab.Vote.ActiveVote.java with:
"List<Player> allLoggedInPlayers = new ArrayList<Player>(); for(Player p : Bukkit.getOnlinePlayers()){ allLoggedInPlayers.add(p); }"
After i did this everything started working as supposed to on spigot 1.8 :)
EDIT: oh right. forgot i had to add some imports to playerwrapper.java or something, but im sure you will find it, eclipse fixed it automatically when i hovered over the error :P
@ThaRam what you want is a poll plugin, im using VotingPoll (http://dev.bukkit.org/bukkit-plugins/votingpoll/)
is there an option to vote on multiple things at once? and then execute a list of commands based upon the results? say i want ask players to vote on maps 1-4 as to which they want to play on next. and if the select 3 it runs the list of preset commands to make that happen?
looking for something more than a yes or no vote.
@snakejawz
If the creator goes offline during a vote they will not be notified, but they will still be included in the voting process. The log will show the last votes, but there's no record keeping.
There's no way to turn this plugin into a polling system due to the design of the plugin when I created it. It's very specific so that you can rely on it to do one thing very well, which is to allow users to manage their own community while admins are not available or online to do so.
I initially specced this plugin out as an end-all plugin that could do everything from multiple votes to polling, but in the end I decided that keeping it simple so that admins can just copy the jar to the plugin folder and run it without configuring anything. As a consequence, the plugin isn't easy to modify.
@MCTheLazeboy
The vote is calculated each time a person votes. If you are the only one on the server it will fail on a single no vote. It also accounts for people who cannot vote. If they do not have the permission to vote, they will not be included in the calculation.
I'll take a look to make sure it's calculating the % to succeed, but I haven't changed the vote counting logic since sometime in 2012.
The "PercentToSucceed"in the config is broken. 1 no will always fail the vote, regardless of the amount of yes.
Here is my config. http://pastebin.com/BSLuA8sc
I really like what you have here but I have a few quick questions.
1: does the vote system notify the vote creator of the outcome if the creator is offline at the time?
2: can you setup server-wide votes and have statistics output for say multiple choice votes?
I would like to use this voting system for my server, but I need the ability to launch a vote and log back in 24hrs or more later and get the status since all our players are on at vastly different times.
@seewind
Sorry seewind, I completely forgot to add your tutorial up to the main page! I updated the page just a moment ago and added in your tutorial video.
Yeah does anyone know how to change the command from /vote to something else?
i use GAListener
Thanks
Hey, i´ve made a german review/tutorial about your plugin!
I hope you like it!
https://www.youtube.com/watch?v=g00UUElyYTI
It would be great, if you can add the video into your post!
Greetings
Chris
@SebasCapo2013YT
the /vote interferes with galistener
Make this becouse a lot of people use votifier:
/votekick
/voteban
/voteday
/votenight
/votemute <- Add this pls
-
/votekick yes/no
and add configurable commands! :D
@RabidCrab
I tried, and it doesnt seem to work. my ops.json file is already converted to work with UUIDs so would that make any difference?
Can you change the commands because when you use Votifier and a listener, the commands are the same and it doesn't work
@Hopp00
Make sure you have a player in the ops.json file. Previously, I had the mod just op Notch, but a bunch of people cried about having the creator of the game as a default op, so now you have to manually do it yourself.
The easiest way to do this is to do "op PlayerName" in the console without the quotes, where PlayerName is the name of the player. After restarting or reloading Bukkit, my plugin should enable with no errors.