-
-
Notifications
You must be signed in to change notification settings - Fork 80
API
Helper class to access core API functions.
Class: VotingPluginHooks
https://bencodez.github.io/VotingPlugin/com/bencodez/votingplugin/VotingPluginHooks.html
Example usage (pseudo-code):
VotingPluginHooks hooks = VotingPluginHooks.getInstance()hooks.getPlugin()hooks.getUserManager()hooks.injectRewardAPI()- '
VotingPluginMain plugin = (VotingPluginMain) Bukkit.getPluginManager().getPlugin("VotingPlugin");
Class: VotingPluginUser
https://bencodez.github.io/VotingPlugin/com/bencodez/votingplugin/user/VotingPluginUser.html
Manager: VotingPluginUserManager
https://bencodez.github.io/VotingPlugin/com/bencodez/votingplugin/user/UserManager.html
plugin.getVotingPluginUserManager().getVotingPluginUser(player)plugin.getVotingPluginUserManager().getVotingPluginUser("BenCodez")plugin.getVotingPluginUserManager().getVotingPluginUser(uuid)
user.getPoints()user.setPoints(100)user.addPoints(10)user.removePoints(5)
Class: VoteSite
https://bencodez.github.io/VotingPlugin/com/bencodez/votingplugin/objects/VoteSite.html
VoteSite site = plugin.getVoteSite("ExampleSite")site.giveRewards(user)
VotingPlugin supports registering custom sub-commands under:
/vote-
/adminvote(alias:/av)
Supported argument types include:
(player), (sitename), (string), (number), (reward), (list), (boolean)
Use Help&? to add multiple aliases.
Example (pseudo-code):
plugin.getVoteCommand().add(new CommandHandler(
new String[] { "Next", "(player)" },
"Permission",
"Help message"
) {
@Override
public void execute(CommandSender sender, String[] args) {
// your code
}
});
More examples:
https://github.com/BenCodez/VotingPlugin/blob/master/VotingPlugin/src/main/java/com/bencodez/votingplugin/commands/CommandLoader.java
All events use Bukkit’s normal event system (@EventHandler).
Below is the complete list of VotingPlugin + AdvancedCore events.
https://bencodez.github.io/VotingPlugin/com/bencodez/votingplugin/events/PlayerVoteEvent.html
Triggered when a vote is received (before processing).
Can be cancelled.
Triggered after the vote is fully processed and rewards are applied.
Triggered whenever a player receives vote points.
Triggers on:
- Milestones
- Streak rewards
- VoteParty rewards
- Top voter rewards
- AllSites / AlmostAllSites rewards
SpecialRewardType:
https://bencodez.github.io/VotingPlugin/com/bencodez/votingplugin/events/SpecialRewardType.html
Triggered when cooldown ends for all sites.
Triggered when cooldown ends for one specific votesite.
https://bencodez.github.io/VotingPlugin/com/bencodez/votingplugin/events/VotePartyEvent.html
Triggered when:
- The vote party threshold is reached
- A vote party reward is fired
Supports cross-server vote party logic.
https://bencodez.github.io/AdvancedCore/com/bencodez/advancedcore/listeners/PlayerRewardEvent.html
Triggered whenever any reward file executes, not just voting rewards.
You can:
- Cancel the reward
- Log rewards
- Modify reward execution
Triggered when plugin version changes.
Triggered when a player logs in after AuthMe / Vanish / LoginSecurity delays.
Useful for:
- vote reminding
- delivering queued rewards
- placeholder recalculation
Triggered whenever:
- Points are added
- Points are removed
- Points are set to a new value
https://bencodez.github.io/VotingPlugin/com/bencodez/votingplugin/events/TimeChangeEvent.html
Triggered when the plugin detects a DAY, WEEK, or MONTH rollover.
- VoteMilestones
- Vote Streak System
- VoteReminders
- Vote Broadcast System
- Vote Logging
- Webhooks
- Time Changes
- Month Date Totals
- VoteShop
- Rewards Overview
- Reward System
- Reward File
- Where to Set Rewards
- All Reward Possibilities
- Reward Examples
- Delayed Reward Command
- World Example
- VotingPlugin Specific Rewards
- Commands & Permissions
- API
- PlaceHolderAPI Placeholders
- Minecraft Server Lists
- Bedrock Player Support
- Transferring Data Storage