use of com.bencodez.votingplugin.events.PlayerSpecialRewardEvent in project VotingPlugin by Ben12345rocks.
the class SpecialRewards method giveMilestoneVoteReward.
public void giveMilestoneVoteReward(VotingPluginUser user, boolean online, int milestone, boolean forceBungee) {
PlayerSpecialRewardEvent event = new PlayerSpecialRewardEvent(user, SpecialRewardType.MILESTONE.setAmount(milestone));
Bukkit.getPluginManager().callEvent(event);
if (event.isCancelled()) {
return;
}
new RewardBuilder(plugin.getSpecialRewardsConfig().getData(), plugin.getSpecialRewardsConfig().getMilestoneRewardsPath(milestone)).setOnline(online).withPlaceHolder("Milestone", "" + milestone).setServer(forceBungee).send(user);
}
Aggregations