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

This plugin contains an API to let other developers extend its functionality.

Usage

Firstly, we need to initialize the API.

CaptchaAPI api = new CaptchaAPI();

Then, we can use any of the following methods:

public List<Captcha> getAvailableCaptchas() {
	return plugin.getCaptchas();
}

public Map<Player, String> getToVerify() {
	return plugin.getToVerify();
}

public List<OfflinePlayer> getVerified() {
	return plugin.getVerified();
}

Lastly, there are some events which you can use.

@EventListener
public void onComplete(PlayerCompleteCaptchaEvent e) {
         Player p = e.getPlayer();
}

@EventListener
public void onFail(PlayerFailCaptchaEvent e) {
         Player p = e.getPlayer();
}
Clone this wiki locally