Move passenger-handling to Entity

This commit is contained in:
Erik Broes
2011-03-29 23:09:05 +02:00
parent ced00079c2
commit 5fd86517e8
2 changed files with 30 additions and 30 deletions

View File

@@ -109,4 +109,34 @@ public interface Entity {
* @return Server instance running this Entity
*/
public Server getServer();
/**
* Gets the primary passenger of a vehicle. For vehicles that could have
* multiple passengers, this will only return the primary passenger.
*
* @return an entity
*/
public abstract Entity getPassenger();
/**
* Set the passenger of a vehicle.
*
* @param passenger
* @return false if it could not be done for whatever reason
*/
public abstract boolean setPassenger(Entity passenger);
/**
* Returns true if the vehicle has no passengers.
*
* @return
*/
public abstract boolean isEmpty();
/**
* Eject any passenger. True if there was a passenger.
*
* @return
*/
public abstract boolean eject();
}