2011-01-03 07:03:17 +01:00
|
|
|
package org.bukkit;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Represents a vehicle entity.
|
|
|
|
*
|
|
|
|
* @author sk89q
|
|
|
|
*/
|
|
|
|
public interface Vehicle extends Entity {
|
|
|
|
/**
|
|
|
|
* Gets the vehicle's velocity.
|
|
|
|
*
|
|
|
|
* @return velocity vector
|
|
|
|
*/
|
|
|
|
public Vector getVelocity();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Sets the vehicle's velocity.
|
|
|
|
*
|
|
|
|
* @param vel velocity vector
|
|
|
|
*/
|
|
|
|
public void setVelocity(Vector vel);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Gets the primary passenger of a vehicle. For vehicles that could have
|
|
|
|
* multiple passengers, this will only return the primary passenger.
|
|
|
|
*
|
2011-01-07 20:16:04 +01:00
|
|
|
* @return an entity
|
2011-01-03 07:03:17 +01:00
|
|
|
*/
|
2011-01-07 20:16:04 +01:00
|
|
|
public Entity getPassenger();
|
2011-01-03 07:03:17 +01:00
|
|
|
|
2011-01-08 01:25:52 +01:00
|
|
|
/**
|
|
|
|
* Set the passenger of a vehicle.
|
|
|
|
*
|
|
|
|
* @param passenger
|
|
|
|
* @return false if it could not be done for whatever reason
|
|
|
|
*/
|
|
|
|
public boolean setPassenger(Entity passenger);
|
|
|
|
|
2011-01-03 07:03:17 +01:00
|
|
|
/**
|
|
|
|
* Returns true if the vehicle has no passengers.
|
|
|
|
*
|
|
|
|
* @return
|
|
|
|
*/
|
|
|
|
public boolean isEmpty();
|
2011-01-08 01:25:52 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Eject any passenger. True if there was a passenger.
|
|
|
|
*
|
|
|
|
* @return
|
|
|
|
*/
|
|
|
|
public boolean eject();
|
2011-01-03 07:03:17 +01:00
|
|
|
}
|