Interface ccRidesAPI


public interface ccRidesAPI
Main class to access the ccRides API
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static ccRidesAPI
    Get the API instance Returns null if ccRides not installed / using older versions
    Checks the API version of the plugin
    int
    getFastPasses(org.bukkit.OfflinePlayer player)
    Get a player's fastpass balance
    Get a specific ride
    Get all configured rides
    void
    setFastPasses(org.bukkit.OfflinePlayer player, int amount)
    Set a player's fastpass balance Fails silently if fastpasses are disabled in ccRides
  • Field Details

  • Method Details

    • getAPI

      static ccRidesAPI getAPI()
      Get the API instance Returns null if ccRides not installed / using older versions
      Returns:
      an instance of the plugin, or null if it was not found
    • getAPIVersion

      String getAPIVersion()
      Checks the API version of the plugin
      Returns:
      the plugin version string
    • getRides

      HashMap<String,Ride> getRides()
      Get all configured rides
      Returns:
      a map of all rides (RideID, Ride)
    • getRide

      Ride getRide(String name)
      Get a specific ride
      Parameters:
      name - - the name/ID of the ride to get
      Returns:
      the requested ride
    • getFastPasses

      int getFastPasses(org.bukkit.OfflinePlayer player)
      Get a player's fastpass balance
      Parameters:
      player - player whose balance to check
      Returns:
      number of fastpasses they currently have, 0 if feature disabled, -1 if they have the unlimited permission
    • setFastPasses

      void setFastPasses(org.bukkit.OfflinePlayer player, int amount)
      Set a player's fastpass balance Fails silently if fastpasses are disabled in ccRides
      Parameters:
      player - player whose balance to change
      amount - new fastpass balance