The concept of the plugin is very easy.
When you receive a new donation, it triggers AsyncDonationEvent.
Some examples:
Add user to whitelist
@EventHandler
public void onDonation(AsyncDonationEvent e) {
Donation donation = e.getDonation();
String username = donation.getUsername();
Currency currency = donation.getCurrency();
int amount = donation.getAmountMain();
if (currency == Currency.RUB && amount >= 500) {
Bukkit.getOfflinePlayer(username).setWhitelisted(true);
}
}Summon entity
@EventHandler
public void onDonation(AsyncDonationEvent e) {
Donation donation = e.getDonation();
Currency currency = donation.getCurrency();
int amount = donation.getAmountMain();
if (currency == Currency.RUB && amount == 150) {
new BukkitRunnable() {
@Override
public void run() {
for (Player player : Bukkit.getOnlinePlayers()) {
World world = player.getWorld();
world.spawnEntity(player.getLocation(), EntityType.GHAST);
}
}
}.runTask(this);
}
}Similar projects
Plugin →Let Me Despawn
Improves performance by tweaking mob despawn rules. Say bye to pesky unintentional persistent mobs.
25MSueta
JourneyMap
Real-time map used for mapping in-game or your browser as you explore.
14.7MSueta
Emotecraft
Create your own emotes in Minecraft.
7.5MSueta
Simple Tpa
A simple tpa plugin which sends requests
5.4MSueta
Common Network
Forge and Fabric Unified Networking Solution
3.9MSueta
Set Home
A lightweight plugin for players to set their homes.
3.8MSueta