Home›Java›Mods›DonationAlertsAPI
DonationAlertsAPI
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:
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 ) ;
        }
    }
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 ) ;
        }
    }

Plugin details

Read from the plugin's own plugin.yml.

Quick facts

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.

Explore more