-
Notifications
You must be signed in to change notification settings - Fork 7
API
LagBug edited this page Jul 10, 2019
·
6 revisions
Firstly, we need to initialize the API.
CaptchaAPI api = new CaptchaAPI();
After initializing the API, there are a few methods that you can use.
public List<Captcha> getAvailableCaptchas() {
return plugin.getCaptchas();
}
public Map<Player, String> getToVerify() {
return plugin.getToVerify();
}
public List<OfflinePlayer> getVerified() {
return plugin.getVerified();
}
There are specific events which you can use as well.
@EventListener
public void onComplete(PlayerCompleteCaptchaEvent e) {
Player p = e.getPlayer();
}
@EventListener
public void onFail(PlayerFailCaptchaEvent e) {
Player p = e.getPlayer();
}