BetterHeadsAPI - AlonsoAliaga/BetterHeads GitHub Wiki

BetterHeadsAPI

BetterHeadsAPI can be used to make some checks easily.

com.alonsoaliaga.betterheads.api.BetterHeadsAPI

Available methods

List<String> getCategories()

  • Returns list of available categories.

ItemStack getHead(int id)

  • Returns head with the id associated. Returns null if not valid head id.

boolean openCategories(Player player)

  • Opens categories GUI for player. Returns whether success or not.

boolean openHeads(Player player, String category, int page)

  • Opens heads gui for player with the selected category and page. Return whether success or not.

ItemStack getRandomHead()

  • Returns a random head.

ItemStack getRandomHead(String category)

  • Returns random head in category. Returns null if category is not valid.

List<Integer> getHeadsIds()

  • Returns list of heads ids.

List<Integer> getHeadsIds(String category)

  • Returns list of heads ids in category. Returns null if category is not valid.

List<Integer> searchHeads(String search)

  • Returns list of heads ids that includes search term in name.

Available events

HeadPurchaseEvent

  • When player purchases/get a head from heads GUI.
⚠️ **GitHub.com Fallback** ⚠️