Interface Ride
public interface Ride
Represents a single Ride
- 
Method SummaryModifier and TypeMethodDescriptiondefault booleanaddPlayer(org.bukkit.entity.Player player) Add a new player to the ride, putting them in the first available seat Ride price, permissions will be checkedbooleanaddPlayer(org.bukkit.entity.Player player, boolean bypassCost, int seatNumber, RideEnterEvent.EnterMethod enterMethod) Add a new player to the ride Adds to the ride queue if the ride is full (still returns true)default booleanaddPlayer(org.bukkit.entity.Player player, boolean bypassCost, RideEnterEvent.EnterMethod enterMethod) Add a new player to the ride, putting them in the first available seatvoiddisable()Disable the ridevoidejectPlayer(org.bukkit.entity.Player player, RideExitEvent.ExitReason reason) Remove a player from the ride (forcefully) Uses the ride's EXIT_TELEPORT_RUNNING option to determine whether to teleport or eject the player at their seatbooleanenable()Enable the rideintFinds the first available seat on the ridegetName()intList<org.bukkit.entity.Player>intgetRiderSeat(org.bukkit.entity.Player player) Find which seat a rider is in Will throw an IllegalArgumentException if player is not on ridegetRideSetting(String key) Get the value of a ride settinggetType()booleanbooleanbooleanvoidsetRideSetting(String key, Object value) Set a ride's settingvoidstartRide(RideStartEvent.StartReason startReason) Starts the movement of a ridevoidstopRide(RideStopEvent.RideStopReason stopReason) Stop a ride (immediately), and kicks players out
- 
Method Details- 
getNameString getName()- Returns:
- this ride's Name / ID
 
- 
getTypeString getType()- Returns:
- a string representing the ride type
 
- 
getRidersList<org.bukkit.entity.Player> getRiders()- Returns:
- an ArrayList containing the players currently on the ride.
 
- 
getRiderSeatint getRiderSeat(org.bukkit.entity.Player player) Find which seat a rider is in Will throw an IllegalArgumentException if player is not on ride- Parameters:
- player- the player whose seat you want to find
- Returns:
- the index of the seat (counts from 0)
 
- 
getConfigOptions- Returns:
- an ArrayList containing the names of all ride settings
 
- 
getConfigOptionTypes- Returns:
- a map containing all ride settings and their type
 
- 
getRideSettingGet the value of a ride setting- Parameters:
- key- the name of the setting
- Returns:
- the current value of the setting
 
- 
setRideSettingSet a ride's setting- Parameters:
- key- the name of the setting
- value- the new value for the setting
- Throws:
- IllegalArgumentException- if value is not correct type for given key
- IndexOutOfBoundsException- if the key does not exist
 
- 
enableboolean enable()Enable the ride- Returns:
- true if enabled successfully, false if encountered an issue.
 
- 
disablevoid disable()Disable the ride
- 
startRideStarts the movement of a ride
- 
stopRideStop a ride (immediately), and kicks players out
- 
firstAvailableSeatint firstAvailableSeat()Finds the first available seat on the ride- Returns:
- the index of the seat, -1 if the ride is full
 
- 
addPlayerboolean addPlayer(org.bukkit.entity.Player player, boolean bypassCost, int seatNumber, RideEnterEvent.EnterMethod enterMethod) Add a new player to the ride Adds to the ride queue if the ride is full (still returns true)- Parameters:
- player- the player to add
- bypassCost- whether to ignore the price
- seatNumber- the seat index to add the player true
- enterMethod- the method used to join the ride
- Returns:
- true if successful, false if failed (i.e. seat taken, not enough money, no permissions)
 
- 
addPlayerdefault boolean addPlayer(org.bukkit.entity.Player player, boolean bypassCost, RideEnterEvent.EnterMethod enterMethod) Add a new player to the ride, putting them in the first available seat- Parameters:
- player- the player to add
- bypassCost- whether to ignore the price
- Returns:
- true if successful, false if failed
 
- 
addPlayerdefault boolean addPlayer(org.bukkit.entity.Player player) Add a new player to the ride, putting them in the first available seat Ride price, permissions will be checked- Parameters:
- player- the player to add
- Returns:
- true if successful, false if failed
 
- 
ejectPlayerRemove a player from the ride (forcefully) Uses the ride's EXIT_TELEPORT_RUNNING option to determine whether to teleport or eject the player at their seat- Parameters:
- player- the player to eject
- reason- the reason for exiting (ie. Command / Ride end etc)
 
- 
isEnabledboolean isEnabled()- Returns:
- whether this ride is currently enabled.
 
- 
isRunningboolean isRunning()- Returns:
- whether the ride is currently running (i.e. moving)
 
- 
isCountdownStartedboolean isCountdownStarted()- Returns:
- whether the ride's countdown (for automatically starting) has begun
 
- 
getRemainingCountdownTimeint getRemainingCountdownTime()- Returns:
- how long is left on the ride's countdown timer. -1 if countdown hasn't started
 
 
-