mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-08 09:17:36 +01:00
Moved getVehicle, leaveVehicle and isInsideVehicle from LivingEntity to Entity. Addresses BUKKIT-811
By: TomyLobo <tomylobo@nurfuerspam.de>
This commit is contained in:
parent
dd1bee786b
commit
38c5de3e6e
@ -233,4 +233,28 @@ public interface Entity extends Metadatable {
|
||||
* @return The entity type.
|
||||
*/
|
||||
public EntityType getType();
|
||||
|
||||
/**
|
||||
* Returns whether this entity is inside a vehicle.
|
||||
*
|
||||
* @return True if the entity is in a vehicle.
|
||||
*/
|
||||
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 True if the entity was in a vehicle.
|
||||
*/
|
||||
public boolean leaveVehicle();
|
||||
|
||||
/**
|
||||
* Get the vehicle that this player is inside. If there is no vehicle,
|
||||
* null will be returned.
|
||||
*
|
||||
* @return The current vehicle.
|
||||
*/
|
||||
public Entity getVehicle();
|
||||
}
|
||||
|
@ -114,39 +114,6 @@ public interface LivingEntity extends Entity {
|
||||
@Deprecated
|
||||
public Arrow shootArrow();
|
||||
|
||||
/**
|
||||
* Launches a {@link Projectile} from the entity.
|
||||
*
|
||||
* @param projectile Class of the projectile to launch
|
||||
*
|
||||
* @return The launched projectile.
|
||||
*/
|
||||
public <T extends Projectile> T launchProjectile(Class<? extends T> projectile);
|
||||
|
||||
/**
|
||||
* Returns whether this entity is inside a vehicle.
|
||||
*
|
||||
* @return True if the entity is in a vehicle.
|
||||
*/
|
||||
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 True if the entity was in a vehicle.
|
||||
*/
|
||||
public boolean leaveVehicle();
|
||||
|
||||
/**
|
||||
* Get the vehicle that this player is inside. If there is no vehicle,
|
||||
* null will be returned.
|
||||
*
|
||||
* @return The current vehicle.
|
||||
*/
|
||||
public Vehicle getVehicle();
|
||||
|
||||
/**
|
||||
* Returns the amount of air that this entity has remaining, in ticks
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user