Skip to content

DaisyVotes — Developer API

DaisyVotes exposes a small, stable developer API for other plugins to react to top-voter wins.

Fired when DaisyVotes pays out a Top Voter award for a completed period (daily, weekly, or monthly). Use it for custom announcements, trophies, broadcasts, or analytics.

Package: cat.daisy.daisyvotes.api.TopVoterAwardEvent

FieldTypeDescription
playerUuidStringThe winner’s UUID.
playerNameStringThe winner’s name.
voteslongTheir vote count for the period.
rankintPlacement — 1, 2, or 3.
periodString"daily", "weekly", or "monthly".
import cat.daisy.daisyvotes.api.TopVoterAwardEvent;
import org.bukkit.Bukkit;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
public class TopVoterListener implements Listener {
@EventHandler
public void onTopVoter(TopVoterAwardEvent event) {
String name = event.getPlayerName();
int rank = event.getRank(); // 1, 2, or 3
String period = event.getPeriod(); // "daily" | "weekly" | "monthly"
Bukkit.getScheduler().runTask(myPlugin, () ->
Bukkit.broadcastMessage("🏆 " + name + " placed #" + rank + " this " + period + "!"));
}
}

Add DaisyVotes as a softdepend (or depend) in your plugin.yml so it loads first:

plugin.yml
softdepend: [DaisyVotes]

You don’t need DaisyVotes on your compile classpath to listen for the event by name, but if you import the event class directly, add the DaisyVotes JAR as a compileOnly/provided dependency in your build.