-
Notifications
You must be signed in to change notification settings - Fork 6
API
LagBug edited this page Jul 10, 2019
·
6 revisions
This plugin contains an API to let other developers extend its functionality.
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.
```java
@EventListener
public void onComplete(PlayerCompleteCaptchaEvent e) {
Player p = e.getPlayer();
}```