Minecraft Server

Setting Up Vote Using Skript (full tutorial and usefull examples)

Simon Maribo - March 25

Learn to set up voting using Skript through our easy tutorial. How to create a vote leaderboard, a vote menu, and much more in Skript. The guide contains useful Skript examples that you can implement.
Setting Up Vote Using Skript (full tutorial and usefull examples)

What is NuVotifier and Skript

Votifier (also known as NuVotifier) is a helpful plugin used by Minecraft servers. It registers players voting on a server from a Minecraft server list. This helps the server become more popular and brings in new players. When players vote, they usually get special rewards in the game, in the form of items and gems. Votifier makes this whole process easy by working with server listing websites to check votes and give out rewards. It's a win-win situation where both the server owners and players benefit. Check out our full tutorial on how to setup Votifier for your server here https://minecraft-list.gg/blog/how-to-setup-and-use-votifier-for-your-server

Skript is a Minecraft plugin for Spigot that enables administrators to create unique and inspiring features for their servers. Using Skripts, you can easily code quick and efficient systems without too much work. In this guide, we'll walk you through how to easily set up amazing Skripts using information from Votifier.

Required plugins for Skript to work

This is a list of the versions of the plugins we have tested with. You will be able to use other versions without having to change too much. The versions are tested on a 1.18.2 server running PaperSpigot.

In the next steps, we show examples of how to listen for Vote events in scripts, give rewards through scripts and set up a nice /vote menu.

How to listen for Vote events through Skript

Below we have posted a simple example of how to listen for Votes through Script. You can use this to easily develop your own Skripts where you listen for votes. In the following steps, we will give examples of how it can actually be used.

#Skript publiched on https://minecraft-list.gg


    set {_player} to (event.getVote().getUsername() parsed as offline player) #Gets the player who has entered a vote on a website.
    set {_site} to event.getVote().getServiceName() #Get the plain URL of the vote website.
    voteReceived({_player}, {_site}) #The function that is called when a vote is received.

function voteReceived(player: offlineplayer, site: text):
    set {_now} to unix timestamp of now
    #{_site} would output the plain URL of the server-list website.
    #If the link to your server-listing page is https://minecraft-list.gg/server/minemalia.20
    #Then {_site} would be "minecraft-list.gg"

    #{_player} is parsed as an offlineplayer. 
    broadcast "%{_now}%" #Timestamp of the vote
    broadcast "%{_player}%" #Example "Maaads_"
    broadcast "%{_site}%" #Example "minecraft-list.gg"

The Skript above can also be found at the following link: https://pastebin.com/tJTJEiKr

How to set up a good looking /vote menu

The video below shows a simple menu with three different heads that provide links to different voting websites. The Skript is free and can be used freely. From this Skript, you can easily develop your own unique systems.

Find the Skript at the following link: https://pastebin.com/5DxCfJjj

How to give Vote rewards through Skript

If you have added the Skript before, you can easily use the voteReceived function to listen for votes and give your servers players. Below are several different examples where players receive coins, money and items. It's really only your own imagination that sets the limits.

function voteReceived(player: offlineplayer, site: text):
    {_site} contains "Minecraft-list.gg": # Checking the vote website

        give {_player} 1 diamond #Example for giving an reward
        command "coins add %{_player}% 25" #Example for giving an reward
        add 500 to {_player}'s balance #Example for giving an reward

        #... list of rewards for each vote.

For this to work, you need to follow the guide from the beginning, where we show you how to listen for votes from Votifier in the first place.

How to create a Vote Top List through Skript

We have developed an easy and simple script that allows you to create a top list of votes using scripts. You can customize it for either a weekly or monthly competition.
Remember to log the data for the users when they vote; this is achieved by adding the following line of code:

 add 1 to {votes::topStats::%{_uuid}%} 

#Must be added under the 'voteReceived*' function, as we discussed in the previous step.

The Skript can be found for free at this link https://pastebin.com/nP2NzgSJ - it can be used freely. Remember you can reset the top data with the command /clearvotestop.

How to give extra good rewards if you vote at Minecraft-list.gg

It's natural to have preferences for certain voting websites where you might want players to focus their voting efforts. As an incentive, one strategy could be to offer extra rewards for voting on these preferred sites. For example, a player could receive more diamonds for casting their votes through a specific website compared to others.

function voteReceived(player: offlineplayer, site: text):
    {_site} contains "Minecraft-list.gg":
        give {_player} 3 diamond
    else if {_site} contains "Minecraft-MP.com":
        give {_player} 2 diamond
    else: #Giving just 1 diamond if not one of the two sites.
        give {_player} 1 diamond

    add 500 to {_player}'s balance #Giving $500 no matter the site.
    #... list of rewards for each vote.

For this to work, you need to follow the guide from the beginning, where we show you how to listen for votes from Votifier in the first place.

More from Minecraft-list.gg

Did you find this blog useful? Be sure to check out our other blogs, we have numerous tutorials as well as reviews of various large servers. Find our other blogs at https://minecraft-list.gg/blog - or find your new favorite server at https://minecraft-list.gg

Join our discord to always be kept up to date on new changes and new blog posts. https://discord.minecraft-list.gg

Minecraft-List.gg is not affiliated with Minecraft or Mojang AB. Copyright © 2024 Minecraft-List.gg - All rights reserved.