geforkt von Mirrors/Paper
Added passenger methods to Vehicle/LivingEntity.
By: sk89q <the.sk89q@gmail.com>
Dieser Commit ist enthalten in:
Ursprung
eb62da78ee
Commit
880f2c11a5
@ -35,4 +35,28 @@ public interface LivingEntity extends Entity {
|
||||
* @return
|
||||
*/
|
||||
public Arrow shootArrow();
|
||||
|
||||
/**
|
||||
* Returns whether this entity is inside a vehicle.
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public boolean isInsideVehicle();
|
||||
|
||||
/**
|
||||
* Leave the current vehicle. If the entity is currently in a vehicle
|
||||
* (and is removed from it), true will be returned, otherwise false will
|
||||
* be returned.
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public boolean leaveVehicle();
|
||||
|
||||
/**
|
||||
* Get the vehicle that this player is inside. If there is no vehicle,
|
||||
* null will be returned.
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public Vehicle getVehicle();
|
||||
}
|
||||
|
@ -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();
|
||||
}
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren