Added passenger methods to Vehicle/LivingEntity.

This commit is contained in:
sk89q
2011-01-07 16:25:52 -08:00
parent d996dc5551
commit ebf69ae6c2
2 changed files with 39 additions and 0 deletions

View File

@@ -28,10 +28,25 @@ public interface Vehicle extends Entity {
*/
public Entity getPassenger();
/**
* Set the passenger of a vehicle.
*
* @param passenger
* @return false if it could not be done for whatever reason
*/
public boolean setPassenger(Entity passenger);
/**
* Returns true if the vehicle has no passengers.
*
* @return
*/
public boolean isEmpty();
/**
* Eject any passenger. True if there was a passenger.
*
* @return
*/
public boolean eject();
}