Class ClueScrollsAPI

java.lang.Object
com.electro2560.dev.cluescrolls.api.ClueScrollsAPI

public abstract class ClueScrollsAPI extends Object
Since:
2.1.0
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    abstract String
    getCrystalTier(org.bukkit.inventory.ItemStack item)
    Get the tier of a crystal item
    Access the ClueScrollsAPI
    abstract org.bukkit.inventory.ItemStack
    getRandomScroll(String mystery, org.bukkit.entity.Player player)
    Get a random tier cluescroll Will obey bind option
    abstract org.bukkit.inventory.ItemStack
    getScroll(String type, org.bukkit.entity.Player player)
    Generate a cluescroll of a random tier Will obey bind option
    abstract String
    getScrollTier(org.bukkit.inventory.ItemStack item)
    Get the tier of a scroll item
    abstract List<String>
    Get a list of all tiers
    abstract String
    Get ClueScrolls version
    static boolean
    Check if the ClueScrollsAPI implementation is available
    abstract boolean
    isCrystal(org.bukkit.inventory.ItemStack item)
    Check if item is a crystal
    abstract boolean
    isScroll(org.bukkit.inventory.ItemStack item)
    Check if item is a scroll
    abstract CustomClue
    registerCustomClue(org.bukkit.plugin.Plugin plugin, String clueName, ClueConfigData... clueConfigData)
    To create a custom clue, you must pass your plugin, the name of the clue and an array of ClueConfigData.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ClueScrollsAPI

      public ClueScrollsAPI()
  • Method Details

    • hasImplementation

      public static boolean hasImplementation()
      Check if the ClueScrollsAPI implementation is available
      Returns:
      true if ClueScrollsAPI available or false if not available
    • getInstance

      public static ClueScrollsAPI getInstance()
      Access the ClueScrollsAPI
      Returns:
      ClueScrollsAPI instance
    • getVersion

      public abstract String getVersion()
      Get ClueScrolls version
      Returns:
      version
    • getTiers

      public abstract List<String> getTiers()
      Get a list of all tiers
      Returns:
      List of all tiers
    • getRandomScroll

      public abstract org.bukkit.inventory.ItemStack getRandomScroll(String mystery, org.bukkit.entity.Player player)
      Get a random tier cluescroll Will obey bind option
      Parameters:
      player - The player who will be given this scroll
      Returns:
      A cluescroll
      Since:
      2.1.8
    • getScroll

      public abstract org.bukkit.inventory.ItemStack getScroll(String type, org.bukkit.entity.Player player)
      Generate a cluescroll of a random tier Will obey bind option
      Parameters:
      type - tier type
      player - The player who will be given this scroll
      Returns:
      A cluescroll
      Since:
      2.1.8
    • isScroll

      public abstract boolean isScroll(org.bukkit.inventory.ItemStack item)
      Check if item is a scroll
      Parameters:
      item - An item
      Returns:
      True if this item is a scroll
      Since:
      4.9.0
    • isCrystal

      public abstract boolean isCrystal(org.bukkit.inventory.ItemStack item)
      Check if item is a crystal
      Parameters:
      item - An item
      Returns:
      True if this item is a crystal
      Since:
      4.9.0
    • getScrollTier

      public abstract String getScrollTier(org.bukkit.inventory.ItemStack item)
      Get the tier of a scroll item
      Parameters:
      item - A scroll item
      Returns:
      The name of the tier or null if not a scroll item
      Since:
      4.9.0
    • getCrystalTier

      public abstract String getCrystalTier(org.bukkit.inventory.ItemStack item)
      Get the tier of a crystal item
      Parameters:
      item - A scroll item
      Returns:
      The name of the tier or null if not a crystal item
      Since:
      4.9.0
    • registerCustomClue

      public abstract CustomClue registerCustomClue(org.bukkit.plugin.Plugin plugin, String clueName, ClueConfigData... clueConfigData)
      To create a custom clue, you must pass your plugin, the name of the clue and an array of ClueConfigData. The name of your custom clue will be yourPlugin_clueName The ClueConfigData represents the different types of data you may want a user to be able to specify in their config under the data section of the clue. To call to update any clues for a player, call CustomClue.handle(Player, ClueDataPair...) passing in the name of the player to update and an array of ClueDataPairs. ClueDataPair is similar to ClueConfigData. You create ClueDataPairs to specify the details of what action the user has completed that you'd like to update clues for. The ClueDataPair.key is the name of the data in the config for the clue, and is also the key you specified when setting up the ClueConfigData for this custom clue. If there is data you wish to ignore entirely, pass a ClueDataPair with it's ClueDataPair.value null.
      Parameters:
      plugin -
      clueName -
      clueConfigData -