Skip to content
LagBug edited this page Jul 10, 2019 · 6 revisions

Initializing

Firstly, we need to initialize the API.

CaptchaAPI api = new CaptchaAPI();

Methods

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();
}

Events

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();
}
Clone this wiki locally