use of com.bencodez.votingplugin.events.PlayerSpecialRewardEvent in project VotingPlugin by Ben12345rocks.
the class SpecialRewards method giveAllSitesRewards.
public void giveAllSitesRewards(VotingPluginUser user, boolean online, boolean forceBungee) {
PlayerSpecialRewardEvent event = new PlayerSpecialRewardEvent(user, SpecialRewardType.ALLSITE);
Bukkit.getPluginManager().callEvent(event);
if (event.isCancelled()) {
return;
}
RewardHandler.getInstance().giveReward(user, plugin.getSpecialRewardsConfig().getData(), plugin.getSpecialRewardsConfig().getAllSitesRewardPath(), new RewardOptions().setServer(forceBungee).setOnline(online));
}
use of com.bencodez.votingplugin.events.PlayerSpecialRewardEvent in project VotingPlugin by Ben12345rocks.
the class SpecialRewards method giveFirstVoteTodayRewards.
public void giveFirstVoteTodayRewards(VotingPluginUser user, boolean online, boolean forceBungee) {
PlayerSpecialRewardEvent event = new PlayerSpecialRewardEvent(user, SpecialRewardType.FIRSTVOTETODAY);
Bukkit.getPluginManager().callEvent(event);
if (event.isCancelled()) {
return;
}
RewardHandler.getInstance().giveReward(user, plugin.getSpecialRewardsConfig().getData(), plugin.getSpecialRewardsConfig().getFirstVoteTodayRewardsPath(), new RewardOptions().setServer(forceBungee).setOnline(online));
}
use of com.bencodez.votingplugin.events.PlayerSpecialRewardEvent in project VotingPlugin by Ben12345rocks.
the class SpecialRewards method giveFirstVoteRewards.
public void giveFirstVoteRewards(VotingPluginUser user, boolean online, boolean forceBungee) {
PlayerSpecialRewardEvent event = new PlayerSpecialRewardEvent(user, SpecialRewardType.FIRSTVOTE);
Bukkit.getPluginManager().callEvent(event);
if (event.isCancelled()) {
return;
}
RewardHandler.getInstance().giveReward(user, plugin.getSpecialRewardsConfig().getData(), plugin.getSpecialRewardsConfig().getFirstVoteRewardsPath(), new RewardOptions().setServer(forceBungee).setOnline(online));
}
use of com.bencodez.votingplugin.events.PlayerSpecialRewardEvent in project VotingPlugin by Ben12345rocks.
the class SpecialRewards method giveVoteStreakReward.
public void giveVoteStreakReward(VotingPluginUser user, boolean online, String type, String string, int votes, boolean forceBungee) {
PlayerSpecialRewardEvent event = new PlayerSpecialRewardEvent(user, SpecialRewardType.VOTESTREAK.setType(type).setAmount(votes));
Bukkit.getPluginManager().callEvent(event);
if (event.isCancelled()) {
return;
}
new RewardBuilder(plugin.getSpecialRewardsConfig().getData(), plugin.getSpecialRewardsConfig().getVoteStreakRewardsPath(type, string)).setOnline(online).withPlaceHolder("Type", type).setServer(forceBungee).withPlaceHolder("Streak", "" + votes).send(user);
}
use of com.bencodez.votingplugin.events.PlayerSpecialRewardEvent in project VotingPlugin by Ben12345rocks.
the class SpecialRewards method giveCumulativeVoteReward.
public void giveCumulativeVoteReward(VotingPluginUser user, boolean online, int cumulative, boolean forceBungee) {
PlayerSpecialRewardEvent event = new PlayerSpecialRewardEvent(user, SpecialRewardType.CUMMULATIVE.setAmount(cumulative));
Bukkit.getPluginManager().callEvent(event);
if (event.isCancelled()) {
return;
}
new RewardBuilder(plugin.getSpecialRewardsConfig().getData(), plugin.getSpecialRewardsConfig().getCumulativeRewardsPath(cumulative)).setServer(forceBungee).setOnline(online).withPlaceHolder("Cumulative", "" + cumulative).send(user);
}
Aggregations