ModsJava
DonationAlertsAPI
Java mod listed for Minecraft 1.16. Downloads from the MC Java Mods app on Android.
⬇ Download on Spigot
The concept of the plugin is very easy.
When you receive a new donation, it triggers AsyncDonationEvent.
Some examples:
When you receive a new donation, it triggers AsyncDonationEvent.
Some examples:
Spoiler: Add user to whitelist
Code (Java):
@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 ) ;
}
}
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 ) ;
}
}
Spoiler: Summon entity
Code (Java):
@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 ) ;
}
}
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 ) ;
}
}
Quick facts
- Edition: Minecraft Java
- File type: .jar
- Minecraft version listed: 1.16
- How to install: Install the matching mod loader (Forge, Fabric or NeoForge) for your Minecraft version. → Download the .jar. → Put it in the .minecraft/mods folder and launch that loader profile.
- Where to get it: Opens on Spigot — not every file is mirrored on our own servers.
Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.
DonationAlertsAPI is a free Minecraft Java mod. Compatible with Minecraft 1.16. Downloaded 199 times (via Spigot). Download it and open it directly in the game.