HomeJavaModsSimpleVote
SimpleVote
ModsJava

SimpleVote

A simple paper plugin that rewards players with tokens when they vote for your server on voting websites

⬇ Download on HangarOpen in MCModsHubGet it on Google Play →
# SimpleVote Plugin **SimpleVote** is a lightweight Minecraft Paper 26.2 plugin that rewards players with tokens when they vote for your server on voting websites. Although it was custom built for [minecraftoffline.net](https://www.minecraftoffline.net), any server can use it. ## Features - Rewards players with tokens for voting - Clickable list of voting sites for players - Automatically handles online and offline player voting - Admin commands to manage tokens ## Installation 1. Download the latest release from [GitHub](https://github.com/Jelly-Pudding/SimpleVote/releases/latest). 2. Place the `.jar` file in your server's `plugins` folder. 3. Restart your server to generate the default configuration. 4. Set up your server on voting sites using the public key displayed on startup or with the `/votekey` command. ## Setting Up Votifier ### Port Forwarding For voting websites to send votes to your server, you must ensure that the Votifier port (default: 8192) is open and forwarded to your server. This typically involves: 1. Setting up port forwarding in your router's configuration 2. Ensuring your firewall allows incoming connections on the specified port 3. If using a hosting provider, check their documentation for port configuration ### Registering on Voting Sites Voting sites may show a **Public Key** field, a **Token** field, or both. Fill in whichever fields the site provides: - **Public Key**: paste the RSA public key. Run `/votekey key` in-game, or copy `votifier.public-key` from `plugins/SimpleVote/config.yml`. - **Token**: paste the HMAC token. Run `/votekey token` in-game, or copy `votifier.token` from `plugins/SimpleVote/config.yml`. Running `/votekey` on its own prints both values at once. Both values are generated automatically the first time the server starts. You never need to create or edit them manually. To register: 1. Start your server with SimpleVote installed. 2. On the voting site's registration page, enter your server's public IP and Votifier port (default: `8192`). 3. Paste the public key, the token, or both, depending on what fields the site provides. ## Troubleshooting - If votes aren't being received, check that: - The Votifier port is correctly forwarded. - You pasted the correct value into the correct field on the voting site (public key or token). - Your firewall permits access on the Votifier port. ## In-game Commands - `/tokens`: Check your current tokens - `/tokens [player]`: Check another player's tokens (requires permission) - `/tokens give [player] [amount]`: Give tokens to a player (admin only) - `/tokens take [player] [amount]`: Take tokens from a player (admin only) - `/tokens set [player] [amount]`: Set a player's tokens (admin only) - `/votesites`: Display a list of clickable voting site links - `/votekey`: Display both the public key and token (admin only) - `/votekey key`: Display the public key only - `/votekey token`: Display the token only ## Permissions - `simplevote.tokens`: Allows checking own token balance (default: true) - `simplevote.tokens.others`: Allows checking others' token balances (default: op) - `simplevote.votesites`: Allows viewing voting sites (default: true) - `simplevote.admin`: Allows managing tokens and accessing admin commands (default: op) ## API for Developers ### Setup Dependencies 1. Download the latest `SimpleVote.jar` and place it in a `libs` directory - and then add this to your `build.gradle` file: ```gradle dependencies { compileOnly files('libs/SimpleVote-2.3.jar') } ``` 2. If SimpleVote is absolutely required by your plugin, then add this to your `plugin.yml` file - and this means if SimpleVote is not found then your plugin will not load: ```yaml depend: [SimpleVote] ``` ### Getting SimpleVote Instance You can import SimpleVote into your project through using the below code: ```java import org.bukkit.Bukkit; import com.jellypudding.simpleVote.SimpleVote; Plugin simpleVotePlugin = Bukkit.getPluginManager().getPlugin("SimpleVote"); if (simpleVotePlugin instanceof SimpleVote && simpleVotePlugin.isEnabled()) { SimpleVote simpleVote = (SimpleVote) simpleVotePlugin; } ``` ### Available API Methods ```java // Get the TokenManager instance TokenManager tokenManager = simpleVote.getTokenManager(); // Get player's current token balance int currentTokens = tokenManager.getTokens(playerUUID); // Add tokens to a player tokenManager.addTokens(playerUUID, 10); // Remove tokens from a player (returns true if successful, false if insufficient tokens) boolean success = tokenManager.removeTokens(playerUUID, 5); // Set player's exact token amount tokenManager.setTokens(playerUUID, 50); ``` ## Support Me [![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/K3K715TC1R)

SimpleVote is a free Minecraft Java mod. Compatible with Minecraft 1.21.10, 1.21.11, 1.21.4, 1.21.6 and newer. Downloaded 319 times (via Hangar). Download it and open it directly in the game.

Explore more