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
@Reoss
Please install the latest Java 7
Edit: Your SVL is named SimpleVoteListener(1) which either means you have 2 copies or you need to rename is back to SimpleVoteListener.jar.
i get a error in server.log
ps. 1.2 version i testet 2.0 before and its dont work i know why the error i need to install java 7 on my server
@xPuyttre
yeah i guessed it wouldn't cause a problem as votes still went through. - everything working fine here (1.2 version still). thanks :)
@xsonarx
The error is a small bug with the way Bukkit loads .yml files. Just ignore it.
But, to properly remove the timed-commands function, simply do
How to do the config so there is no timer commands. no matter what i do i get the error msg (i think its trying to create the config again) lol
@xPuyttre
Thanks for the reply. I have no need to downgrade when your 1.2 version works fine. A member over there has the same error as me posted so im just waiting for a reply to his post.
@xsonarx
Well the error you posted is from Votifier, I don't see any connections to SimpleVoteListener. The error just says that it can't read the vote that was sent. One fix is to stop your server, delete the RSA folder in your Votifier folder, and run the server again to generate a new public and private key. Then you can use that public key on your voting service.
If that doesn't work, many try downgrading to CraftBukkit R0.1 (2603) and it fixes all their problems.
@Enkious
Hmm... I could implement something like that in the future but as of now that would not work. I can work on that and possibly get it done for next week. Thanks for the suggestion :)
This is your cfg.
Was wondering if you could input something along the lines like..
@xPuyttre
Votifier is 1.9 (i edited my last post). volt is default nothing has been put in the listeners folder. [CB-2624]
@xsonarx
Hi,
Can you please tell me the version of Votifier you are using and the version of CraftBukkit you are using to run the server.
Thanks
My key is right. My setup works fine with 1.2. But the 2.0 version has a bug that spams console and the rewards don't get given to players ingame: http://pastebin.com/XDiqDFzV
@UnitedFactions
No. Please tell me what you mean though, I might implement that in the future.
Does this support sql databases to store votes? Thanks!
@ForsakenRealmz
All Java 6 plugins work with Java 7 and it is definitely worth upgrading. Click here for Java 7 Standard Edition.
@GamersCorp
If the player that voted isn't online, the vote won't go through. This is to prevent errors from commands that cannot be performed without the player being online. If this is not the case, please post your config file, version of Votifier, version of CraftBukkit, and the error log if there is an error in the console.
@xPuyttre
Hey that's for being an awesome plugin author and responding to my comments. So, do you think I should upgrade to Java 7? If I do.. Do you think my other plugins won't work or do you think they are integrated for both Java 6 and 7?
@jhs232
Thats what I thought. However, it doesn't work. No items or money are given to the player.
@GamersCorp
Read the "Installation" part. It clearly states all you need to do is put SimpleVoteListener.jar into your plugins folder, and then it will connect to Votifier and work.
@xPuyttre
Ok, thanks. Btw this plugin is awesome!
Just to be clear, you don't put this in the listener folder of Votifier?
If you don't, then do you change where Votifier looks for a listener?
@jhs232
They start after a vote has been made.