geforkt von Mirrors/Paper
Move passenger-handling to Entity
By: Erik Broes <erikbroes@grum.nl>
Dieser Commit ist enthalten in:
Ursprung
de1f8b0dba
Commit
d17f2813d9
@ -109,4 +109,34 @@ public interface Entity {
|
|||||||
* @return Server instance running this Entity
|
* @return Server instance running this Entity
|
||||||
*/
|
*/
|
||||||
public Server getServer();
|
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();
|
||||||
}
|
}
|
||||||
|
@ -21,34 +21,4 @@ public interface Vehicle extends Entity {
|
|||||||
* @param vel velocity vector
|
* @param vel velocity vector
|
||||||
*/
|
*/
|
||||||
public void setVelocity(Vector vel);
|
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.
|
|
||||||
*
|
|
||||||
* @return an 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();
|
|
||||||
}
|
}
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren