VotingPlugin uses a flexible reward system for Minecraft servers. Rewards can be defined directly in the config or referenced from separate YAML reward files. This page explains how to configure both methods for server administrators.
Inline rewards are defined directly in the main config (e.g., VoteSites.yml
or Config.yml
).
This method is best for quick setups or one-off rewards.
Example: Inline Vote Reward
VoteSites:
ExampleSite:
Enabled: true
Name: 'Example Voting Site'
ServiceSite: 'example.com'
VoteURL: 'http://example.com/vote'
VoteDelay: 24
Rewards:
Items:
Diamond:
Material: 'DIAMOND'
Amount: 1
Money: 5
EXP: 100
Commands:
Console:
- 'say %player% was lucky'
⚠️ You cannot mix example reward files with inline definitions in the same Rewards: block.
Reward files allow you to organize reusable rewards in separate .yml files.
How It Works
Each reward file lives in plugins/VotingPlugin/Rewards/.
Named .yml.
Contains items, commands, money, messages, or other supported rewards.
Referencing Reward Files
In the main config, reference the reward file by its base name (without .yml):
VoteSites:
ExampleSite:
Rewards: 'MyCustomReward'
Multiple reward files can be used together:
Rewards:
- 'FirstVote'
- 'VotePartyBonus'
⚠️ Important: Example reward files provided by the plugin or wiki cannot be used directly. You must create your own .yml files. This is because example files are generic and may not fit your server's specific needs.
To create a custom reward file:
Navigate to plugins/VotingPlugin/Rewards/.
Create a new file named MyCustomReward.yml.
Define your reward structure within this file, such as:
Items:
Diamond:
Material: 'DIAMOND'
Amount: 1
Money: 5
EXP: 100
Commands:
Console:
- 'say %player% was lucky'
Reference this file in your VoteSites.yml:
VoteSites:
ExampleSite:
Rewards: 'MyCustomReward'
This approach ensures that your rewards are tailored to your server's configuration and needs.
Example Reward File
# plugins/VotingPlugin/Rewards/MyCustomReward.yml
Items:
Diamond:
Material: 'DIAMOND'
Amount: 1
Money: 5
EXP: 100
Commands:
Console:
- 'say %player% was lucky'
Rewards can be triggered by several events, but use the same internal reward handling
Reference reward files or inline definitions depending on the event:
FirstVote:
Rewards: 'FirstVoteRewardFile' # Using a reward file
FirstVote:
Rewards: # Inline rewards
Items:
Diamond:
Material: 'DIAMOND'
Amount: 1
Use inline rewards for simple, one-time setups.
Use reward files for complex or reusable reward sets.
Never use example reward files directly; always create your own .yml files.
Keep reward file names unique and descriptive.
Organize your rewards consistently to simplify maintenance.
Inline rewards are quick and embedded directly in the main config.
Reward files are reusable, separate .yml files that can be referenced by name.
Rewards are triggered by votes, vote parties, milestones, streaks, cooldowns, and top-voter events.
Always create your own reward files; example files are for reference only.
Use consistent naming and organization for clarity and maintainability.