diff --git a/paper-api/src/main/java/org/bukkit/entity/Entity.java b/paper-api/src/main/java/org/bukkit/entity/Entity.java index 759e3f0d94..b4a70518a8 100644 --- a/paper-api/src/main/java/org/bukkit/entity/Entity.java +++ b/paper-api/src/main/java/org/bukkit/entity/Entity.java @@ -179,30 +179,62 @@ public interface Entity extends Metadatable, CommandSender, Nameable { * multiple passengers, this will only return the primary passenger. * * @return an entity + * @deprecated entities may have multiple passengers, use + * {@link #getPassengers()} */ - public abstract Entity getPassenger(); + @Deprecated + public Entity getPassenger(); /** * Set the passenger of a vehicle. * * @param passenger The new passenger. * @return false if it could not be done for whatever reason + * @deprecated entities may have multiple passengers, use + * {@link #getPassengers()} */ - public abstract boolean setPassenger(Entity passenger); + @Deprecated + public boolean setPassenger(Entity passenger); + + /** + * Gets a list of passengers of this vehicle. + *
+ * The returned list will not be directly linked to the entity's current
+ * passengers, and no guarantees are made as to its mutability.
+ *
+ * @return list of entities corresponding to current passengers.
+ */
+ public List