Package net.clownercraft.ccRides.API
Interface ccRidesAPI
public interface ccRidesAPI
Main class to access the ccRides API
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic ccRidesAPI
getAPI()
Get the API instance Returns null if ccRides not installed / using older versionsChecks the API version of the pluginint
getFastPasses
(org.bukkit.OfflinePlayer player) Get a player's fastpass balanceGet a specific ridegetRides()
Get all configured ridesvoid
setFastPasses
(org.bukkit.OfflinePlayer player, int amount) Set a player's fastpass balance Fails silently if fastpasses are disabled in ccRides
-
Field Details
-
API_VERSION
- See Also:
-
-
Method Details
-
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
Get all configured rides- Returns:
- a map of all rides (RideID, Ride)
-
getRide
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 changeamount
- new fastpass balance
-