TMDevelopmentTinulica & Maiky

Developer API

Developer API

1.0.22+ · package dev.tmdevelopment.flarereferrals.api · add FlareReferrals to softdepend in your plugin.yml.

int invites = FlareReferralsAPI.getInvites(player.getUniqueId());
UUID inviter = FlareReferralsAPI.getInviter(player.getUniqueId());   // null = nobody
boolean waiting = FlareReferralsAPI.isPending(player.getUniqueId()); // waits for the playtime check
List<FlareReferralsAPI.TopEntry> top = FlareReferralsAPI.getTop(10);
EventWhen
ReferralEventa player writes /referrals <inviter> and the checks passed, before the invite is saved. Cancellable: FlareReferrals then sends nothing, tell the player why yourself
ReferralCompleteEventthe invite counts (right away or after the playtime check). getPlayer(), getInviter(), getInviterName(), getInvites()
@EventHandler
public void onInvite(ReferralCompleteEvent e) {
    if (e.getInvites() == 50) Bukkit.broadcastMessage(e.getInviterName() + " invited 50 players!");
}

Everything runs on the main thread. On a network the events are called on the server where the player wrote the command.

Last updated

Sign in

New here? Just enter your email: the account is created when you click the link. No password needed.

or

We send you a link that signs you in with one click. It works for new and existing accounts.

Sign in with a password instead

By continuing you accept the Terms & Conditions and the Privacy policy.

Staff: open “Sign in with a password instead” and type your username instead of the email. After the password we ask for your 2FA code.