DrexHD/Fabric-Votifier

adding a reward for voting

AkumaChikara opened this issue · 1 comments

I want to automaticly reward players for voting. after searching through many forums I still haven't found a solution yet. maybe you can help.
Thank you in advance

  1. Install this fabric mod (grab the jar from the releases)
  2. Start and stop your server. In votifier folder you will find everything you need for the Votifier (public key and config file are the important ones).
  3. In the config file you can change what commands should be executed when a player votes. Most commands only work if the player is online.
  4. Setup votifier on your vote websites. You can use websites like votifier-tester to test your setup!

If you want to allow your players to vote while being offline and get rewarded when they join you can do the following:

  • Create a dummy scoreboard: /scoreboard objectives add voted dummy
  • Add the command scoreboard players add %PLAYER% voted 1 to your votifier config
  • Setup repeating command blocks (or functions in datapacks) that run (in this order):
    • /execute as @a if score @s voted matches 1.. run give @s minecraft:apple 5 (replace give @s minecraft:apple 5 with the command you want to run when they join, if you wish to execute multiple commands, add more commands like this)
    • /execute as @a if score @s voted matches 1.. run scoreboard players remove @s voted 1 (this command should be executed after all the others)

If you need any further help, feel free to join my discord!