-
Notifications
You must be signed in to change notification settings - Fork 0
API
ProTerUga edited this page Jul 16, 2026
·
7 revisions
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
<dependency>
<groupId>io.github.ProTerUga</groupId>
<artifactId>DonationAlertsAPI</artifactId>
<version>VERSION</version>
<scope>provided</scope>
</dependency>repositories {
maven { url 'https://jitpack.io' }
}
dependencies {
compileOnly 'io.github.ProTerUga:DonationAlertsAPI:1.0.0'
}public class MyDonationListener implements Listener {
@EventHandler
public void onDonation(DonationEvent event) {
String sender = event.getUsername();
double amount = event.getAmount();
String currency = event.getCurrency();
String message = event.getMessage();
Bukkit.broadcastMessage("§a" + sender + " donated " + amount + " " + currency + "!");
Bukkit.dispatchCommand(Bukkit.getConsoleSender(), "give " + sender + " diamond 1");
}
}Bukkit.getPluginManager().registerEvents(new MyDonationListener(), this);depend: [DonationAlertsAPI]
# or
softdepend: [DonationAlertsAPI]Getting Started
Advanced usage