Simple Vote Listener
SimpleVoteListener
SVL requires Java 7
Description
SimpleVoteListener was designed to be as lightweight as possible and make endless possibilities. SimpleVoteListener can perform commands, broadcast messages, and do everything you could possibly need it to do.
PLANNED Features
- Vault Economy support.
- Bungeefier and Spigot support.
- Public broadcasts.
- Private messaging to voting players.
- Offline voting.
- Unknown player blocking. (Vote will not go through unless player has joined server previously)
- Configurable
- Permissions can be given and taken upon vote.
- Items can be given to player.
- Commands can be run through console upon voting.
- Service-specific awards.
- Permission-specific awards.
- Vote counting.
- Vote count awards.
- Timed commands.
- Timed commands continue after restarting server.
- Config variables.
- Color codes in config.
Installation
Requires Votifier
- Drop SimpleVoteListener.jar into your plugins directory.
- Reload or restart your server.
- Done!
note: You don't need to do anything special to get SimpleVoteListener to connect to Votifier
Planned Commands
/svl reload - Reloads configuration.
/svl test - Tests vote process.
/svl debug - Toggles debug mode for development.
Usage
Sample usage:
# Changing the version will ruin your config. version: 1.0 debug: false vault: true time-format: 'HH:mm:ss' public-broadcast: '&e%player% voted from %service%!' private-message: '&aThanks, &c%player%&a, for voting!' player-awards: money: 100 permissions: - 'example.permission' - 'example.permission.two' items: - 'ITEM{DATA_VALUE}:AMOUNT' - 'WOOL{6}:64' commands: - 'warp %player% vote' # Note that specific awards do not include the awards above. specific: # Awards given to players that vote from a specific voting service. service: PlanetMinecraft: money: 100 permissions: - 'example.permission' items: - 'DIAMOND:1' commands: - 'warp %name% pmc' # Awards given to players that have a specific permission. # Replace dots with dashes in permissions. permissions: example-permission: money: 100 permissions: - 'example.permission' items: - 'GOLD_BAR:1' commands: - 'warp %name% china' # Awards given to players that have voted a specific amount of times. votes: 100: money: 100 permissions: - 'example.permission' items: - 'DIAMOND:10' commands: - 'say %name% has voted %votes% times!'
- %name% - Username of the player. Not the nickname.
- %ip% - IP Address of the player who voted
- %time% - Not sure what format of time, Votifier handles the format.
- %service% - Service used when voting, eg. "PlanetMinecraft.com"
- %votes% - Amount of times player has voted.
- %connection% - Returns "online" or "offline" accordingly.
Troubleshooting
Nothing is Happening on Vote
- Check to make sure the port you are using in your Votifier config is not already in use.
- Read the Troubleshooting section on the Votifier page.
Plugin not generating files
- Make sure your plugins folder isn't restricted. Usually this is not the case if other plugins can write files to it.
- Try using Java 7 instead of Java 6.
- Check that you're using the correct version of CraftBukkit corresponding to the version of SVL.
Config not working
- Parse your config by pasting it. If there is an error it will tell you the line and column number!
- Make sure you are using correct variables (listed above)
Commands not being run
- Check to make sure you have a plugin that can run the commands you are trying to run!
- Some plugins don't let certain commands run from the console, and there is nothing that can be done except look for a different plugin!
Connecting to Votifier but not SVL
- Make sure SVL started up without errors and is enabled by typing
/pl
(it should be green in the list). - Make sure config works by checking advanced setups section of Configuration Page
Still not working?/Question not answered?
Leave a comment with the following:
- SVL version
- Votifier version
- CraftBukkit version
- Errors in console (if one is given)
- Config file posted on either pastie.org or pastebin.com
- Actual problem typed and explained to best of detail
@Bubelbub
Version 2.0 required Java 7, so either upgrade Java or SVL to v2.2 :)
Thanks!
@xPuyttre
Hi everyone. So 2.2 will fix everything?
I've just use it for the first time with votifier.
How can I check for errors?
@RevoMods
It's still has to be approved by the BukkitDev team. It must be a busy day on BukkitDev ;)
How do I get 2.2? 2.1 isn't work at all.
To all people using v2.1, please upgrade to v2.2 if you were having issues previously!
@KoohwWhip
Hi,
Please post your
This currently does not work for my players. They voted but never got the diamonds I put in the config. Is their something I'm doing wrong? It said v2.1 No longer requires Java but the diamonds won't be given to the players.
Will the new site checker feature be able to run no commands when the vote twice, but when they vote for a third time, run one command? Or something like that..
@MrWicked0
Sure,
Just added the source in the description.
Any chance we can have the source-code to this listener? I would like to make some edits. Specifically having the players credit while there offline. For the commands I am using, they can be called while the player is offline. No need to buffer them and wait for a login.
Aside from that, awesome work its much appreciated!
@TYLRDA
As long as the plugin starts up with no errors, you have Java 7 :)
Ohh I see thanks for the help! Ill check with my hosting provider about Java 7! Thanks so much!
@TYLRDA
The server requires Java 7. In your config, it looks like you add the user to the "we" group 24 hours after they make the vote. Did you mean to do something more like http://pastie.org/6350950 ?
When you say 'Requires Java 7' does that mean the players needs java 7 or the hosting computer needs java 7 or both? Also, this doesnt seem to be working at all. When a user vote they get the diamond but not the rank. Heres my config:
http://pastie.org/6349435
"we" is the subgroup I want added. Does this work for Essentials GroupManager or am I doing something wrong? The player gets the diamond but not the rank. The console says nothing either.
I placed this into my plugin folder, configured it and everything. But it still didn't work! I have votifier enabled on all my voting sites and such.. What's wrong?
Is it because it's still looking for the Listeners in the Listener folder?
I just realized that my econ plugin isn't able to give money from the console. Is it possible to have a vault hook so SimpleVoteListener can add money to accounts?
Great job on the recent updates btw!
Also, the planned feature Vote Counter... That sounds great! It would be neat if there was a /vote stats <player> command so people can see how often others have voted. Maybe even /vote stats top <#> so people can see the top 5 or 10 or 100 voters.
@xPuyttre
Thank you so much. This will Be very useful.
@DarkxStormZz
Read above my post further down.
@DarkxStormZz
Hi
Sorry, but none of those features are implemented right now. However, I am working on multiple votes so different commands can be added after a certain amount of votes.
hi i was just wondering is there a way to get different item/money when they vote on different site's eg: site A you get 1 iron block site b you get $ 50
and cane we do something along the lines like..
commands: - 'give %name% iron 20'
commands after 5 votes: - 'give %name% iron 40'
commands after 10 votes: - 'give %name% diamond 3'
commands after 20 votes: - 'give %name% diamond 10'