# Vote Reward

To claim a vote reward, a player is required to have a certain number of votes for the server, which means that the reward has a mandatory attribute:

* `required-votes` \[number] - the number required to achieve this reward.

### Example configuration

{% code fullWidth="true" %}

```yaml
# Decides if rewards will be claimable.
enabled: true
type: vote_reward
#
# Reward tag
#
tag: Vote Reward
#
# Permission which the player must have to be
# able to obtain this reward.
#
permission: ultimaterewards.exampleVote
#
# Required votes to achieve this reward.
#
required-votes: 20
#
# NOTE THAT ITEM & SOUND NAMES ARE SLIGHTLY DIFFERENT BETWEEN >1.12 & 1.13< VERSIONS!
# SO MAKE SURE YOU ARE USING VALID ITEM NAMES (DEFAULT ONES ARE USED FROM 1.13+ VERSIONS)
# OTHERWISE, THEY WILL BE REPLACED BY STONE IF AN INVALID NAME IS USED.
#
# When the player achieves the required votes,
# this version of the reward item is displayed in the inventory:
#
available-item: "LIME_DYE"
available-display-name: "&a&lVOTE REWARD"
available-lore:
  - "&7You have collected"
  - "&7enough votes to obtain"
  - "&7this reward!"
  - " "
  - "&b► Click to claim!"
#
# Whereas when the player doesn't have enough required votes,
# this version of the reward item is displayed in the inventory:
#
unavailable-item: "RED_DYE"
unavailable-display-name: "&c&lVOTE REWARD"
unavailable-lore:
  - "&7You need to collect"
  - "&7enough votes to be able to obtain"
  - "&7this reward!"
  - " "
  - "&4► Requires another %requiredVotes% votes"
#
# When the player has already claimed this reward:
#
claimed-item: "GRAY_DYE"
claimed-display-name: "&7&lVOTE REWARD"
claimed-lore:
  - "&7You have already"
  - "&7claimed this reward"
  - "&7for %votes% votes!"
#
# When the player doesn't have permission for this reward,
# the following properties will be shown.
#
no-permission-item: BARRIER
no-permission-display-name: "&c&l&mVOTE REWARD"
no-permission-lore:
  - "&c ✕ Locked, requires"
  - "&c   %permission% permission"
#
# Commands list that will be executed after the player
# obtains this reward.
# All available actions can be found on
# https://revivalo.gitbook.io/ultimaterewards/
#
# Format: [] - required value | () - optional value
#   [<actionType>] (<chance>):<command>
#
# Examples:
#   - [console] 50:give %player% diamond 1
#       - this command will have a 50%
#         execution chance due to its property value
#
#   - [message] "&aYou have claimed your %type% reward!"
#       - this action will send the player a message
#         with the defined content
#
# You can also use the random placeholders
# from randoms.yml file and use them in a command.
# Example:
#   - give %player% iron_ingot %exampleRandom%
#       - the placeholder will be replaced by
#         a random number from the defined interval in randoms.yml
#
actions:
  - '[console] give %player% diamond 1'
  - '[console] say %player% claimed their %type% reward!'
  - '[message] &7You have claimed the vote reward for |&7 20 votes! Keep up the great work.'
#  - '[actionbar] &aSuccessfully claimed!' # Action bar can be used only from 1.12 versions!
  - '[title] &aClaimed'
  - '[subtitle] &aReward %type%'

```

{% endcode %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://ultimaterewards.athelion.eu/configuration/rewards/reward-types/vote-reward.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
