Get help or talk to developers on Discord!
PocketVote is a middleman service for both Minecraft Server Lists and Minecraft Server Owners. It aims to drastically better how voting is done on MCPE. Gone is the days of old.
PocketVote is completely free to use, however any donations to cover the operational costs of PocketVote is gladly accepted.
You can send Bitcoin (BTC) to the following address to support PocketVote: 3QC8XUfjXQSMg4CKvvQdscMPQts5wxM9su
I am a server owner:
Register at PocketVote.io/register.
Add a server at PocketVote.io/servers by clicking the add server button.
Click Show Secrets and copy your secret.
Go to one of the supported sites
When prompted for your secret, provide the secret you got at PocketVote.io.
Download one of the official plugins at PocketVote.io.
Use the identity generated at PocketVote.io/dashboard/servers and follow the plugin instructions on how to utilize the identity.
Instructions for PocketMine available here.
Please ensure that you only give your secret to sites you trust. If you for some reason need to reset your secret you can do so in the same place that you can view your secret.
I am a server list operator:
Register at PocketVote.io/register and select “Server List Site” under I have a.
Add a site at PocketVote.io/dashboard/sites/create.
Click Show Secrets.
Take note of the JWT secret and Identity header.
Server list operators:
Make yourself familiar with JWT.io as you will need to understand it. It supports most languages available, so don’t feel required to write your POST in one specific language.
In this example I will be using node-jsonwebtoken. You can install it by typing
npm install jsonwebtoken
For use with PocketVote we will be utilizing standard HMAC SHA256 so you can do the following:
var jwt = require('jsonwebtoken');
var token = jwt.sign({ player: 'Steve', ip: '127.0.0.1', server: SECRET_YOU_GOT_FROM_SERVER_OWNER}, JWT_SECRET_YOU_GOT_FROM_POCKETVOTE);
Your token is now ready to be sent. Make sure you send the token parameter with the name token.
When sending a request to PocketVote, you need to make sure that the target address is https://api.pocketvote.io/vote failure to do so will reject your request. The method also has to be POST.
In order to identify you, you’ve been given a UUID by PocketVote.io, please add this to your HTTP headers with the key Identity
Do note that if your JWT library does not automatically insert a timestamp (iat) then you must do this yourself.
If you see “success”, you’re all golden.
Plugin developers:
To run your code when a vote is registered simply listen to the VoteEvent. You can get the IP, player name or site name through the event object.
If you own a server listing that supports PocketVote, open a Github Issue and we’ll get you added to the list.
Hey dude! Help me out for a couple of :beers:!