Voting

Enabling

To enable voting, open the FeatureConfig.json and find the setting that says: “enable voting” and set it to true. Save the file and then restart the server.

Voting Setting

Open the VoteSettings.json file, located in /config/serverutils/vote/ folder.

For the “host” you will need to put your server IP, for example: “zencraft.elrol.dev”
For the “port” you need to put whichever port you want votifier to listen on. I would suggest using 8192 unless you need to change it to something else.

For the “voteLinks”, the first string is the website name. You can use formatting codes in this. The second one is the link to the website to vote at. This will be turned into a clickable link in game, so make sure to include the “https://”
For each website you want to add, include a comma after the previous one. For example:

"voteLinks": {
    "&aFirst Link": "https://somewebsite.com/server/vote/",
    "&gSecond Link": "https://someotherwebsite.com/server/vote"
}

The vote links are used when players run /vote. It will display them and allow the players to click on the links to open them in their browsers.

Rewards

The “rewards” setting is a list of each reward.
A reward consists of 2 things:

  • A list of commands to run
  • The weight the reward has

To determine a player’s reward, all of the weights are added together and then a random number is chosen. So the higher the weight in relation to the other weights, the more of a chance it has of being given.

For example, 2 rewards with weights of 1 and 2 would mean that the second one would be chosen 2/3 of the time and the first one would only have a 1/3 chance. If you change those numbers to 100 and 200, the odds are the same.

Here is the default reward:

{
    "commands": [
        "give {player} diamond"
    ],
    "weight": 1.0
}

When the reward is given, it will replace each {player} with the player’s name.
If you want to have more than one reward, simply add another and put a comma between them. Like this:

"rewards": [
    {
        "commands": [
            "give {player} diamond"
        ],
        "weight": 1.0
    },
    {
        "commands": [
            "give {player} dirt"
        ],
        "weight": 10.0
    }
]

For the “tokenMap” and “disableV1Protocol”, you don’t need to mess with those unless you know what you are doing.

Save the file and use /sureload

Connecting to a vote site

To start, you need to find the site you want to connect it to. Most of the Minecraft related server sites will support votifier. If it doesn’t then you will need to find another one.
Here are a list of a few that I use:

For this guide I will be using TopG as the example.
You will need to log in to the site in order to create a server listing.

  1. On your dashboard you will see the: “+Add New” button.
  2. Click on that and select Minecraft as the category.
  3. Insert the title of your server, the IP and port (ignore the port if it is 25565)
  4. Fill out any of the optional info you wish to include
  5. Click on the button that says: Enable Votifier
  6. For the Votifier IP, use your server IP.
  7. For the Votifier Port, you need to use the port listed in your VoteSettings config file.
  8. For the Votifier Public Key, you will need to go into the /config/serverutils/vote/rsa/ folder and open the public.key with whichever text editor you wish. Paste the contents into the Votifier Public Key section.
  9. When that is all done, hit submit.