API

Methods

The main class for the API is TheSearchAPI. You can use this class whenever you want in your plugin.

int total = TheSearchAPI.getTotalFoundObjects(Player player,String searchName);
int remaining = TheSearchAPI.getRemainingObjectsToFind(Player player,String searchName);
boolean isCompleted = TheSearchAPI.hasCompletedSearch(Player player,String searchName);

Events

// Event called when a player finds an object
@EventHandler
public void findObject(SearchFindEvent event){
    Player player = event.getPlayer();
    ObjectToFind object = event.getFoundObject();
    Search search = event.getSearch();
    boolean isLastBlock = event.isLast();
}

Last updated