public class SpawnedVehicle
extends java.lang.Object
Constructor and Description |
---|
SpawnedVehicle(StorageVehicle storageVehicle)
Constructor for new spawned vehicle
|
Modifier and Type | Method and Description |
---|---|
void |
damage(int amount)
Damage the vehicle (If enabled)
|
void |
despawn(boolean force)
Despawn a spawned vehicle
|
static SpawnedVehicle |
fromString(org.bukkit.entity.ArmorStand holder,
java.lang.String input,
StorageVehicle storageVehicle)
load the spawnedvehicle based on data string
|
int |
getCurrentSpeedInKm()
Get current speed in kilometers an hour
|
void |
spawn(org.bukkit.Location loc)
Spawn the spawnedvehicle
|
java.lang.String |
toString()
Serialize spawnedvehicle to a string
|
void |
update()
Update all positions (parts and skins)
Handle collisions.
|
public SpawnedVehicle(StorageVehicle storageVehicle)
storageVehicle
- the storage vehicle containing the data to create a new spawned vehiclepublic void spawn(org.bukkit.Location loc)
loc
- the location to spawn atpublic void despawn(boolean force)
public static SpawnedVehicle fromString(org.bukkit.entity.ArmorStand holder, java.lang.String input, StorageVehicle storageVehicle) throws java.lang.ClassNotFoundException
holder
- the armorstand holder of the vehicleinput
- the datastringstorageVehicle
- the storagevehicle it is linked tojava.lang.ClassNotFoundException
- exceptionpublic java.lang.String toString()
toString
in class java.lang.Object
public void update()
public void damage(int amount)
amount
- the amount of damagepublic int getCurrentSpeedInKm()