Added minecart classes, vehicle class, and the ability to spawn minecarts. StorageMinecart needs a getInventory(), but that is waiting on the addition of inventory code.
By: sk89q <the.sk89q@gmail.com>
This commit is contained in:
37
paper-api/src/main/java/org/bukkit/Vehicle.java
Normal file
37
paper-api/src/main/java/org/bukkit/Vehicle.java
Normal file
@@ -0,0 +1,37 @@
|
||||
package org.bukkit;
|
||||
|
||||
/**
|
||||
* Represents a vehicle entity.
|
||||
*
|
||||
* @author sk89q
|
||||
*/
|
||||
public interface Vehicle extends Entity {
|
||||
/**
|
||||
* Gets the vehicle's velocity.
|
||||
*
|
||||
* @return velocity vector
|
||||
*/
|
||||
public Vector getVelocity();
|
||||
|
||||
/**
|
||||
* Sets the vehicle's velocity.
|
||||
*
|
||||
* @param vel velocity vector
|
||||
*/
|
||||
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 a living entity
|
||||
*/
|
||||
public LivingEntity getPassenger();
|
||||
|
||||
/**
|
||||
* Returns true if the vehicle has no passengers.
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public boolean isEmpty();
|
||||
}
|
||||
Reference in New Issue
Block a user