me.legofreak107.vehiclesplus.vehicles.vehicles.objects

## Class SpawnedVehicle

- java.lang.Object
- - me.legofreak107.vehiclesplus.vehicles.vehicles.objects.SpawnedVehicle

All Implemented Interfaces:
  IVehicle

    public class SpawnedVehicle
    extends java.lang.Object
    implements IVehicle

### Constructor Summary

Constructors
Constructor and Description
`SpawnedVehicle()`
`SpawnedVehicle(StorageVehicle storageVehicle)` Constructor for new spawned vehicle

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`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
`BaseVehicle` `getBaseVehicle()`
`java.lang.Double` `getBrakeForce()` The brake force of the vehicle
`CollisionManager` `getCollisionManager()` The collision manager of the vehicle
`int` `getCurrentSpeedInKm()` Get current speed in kilometers an hour
`org.bukkit.entity.ArmorStand` `getHolder()` The holder of the vehicle (The center)
`java.lang.Boolean` `getLocked()` Is this vehicle locked
`java.util.List<org.bukkit.util.Vector>` `getMomentum()` Current momentum of the vehicle
`java.lang.String` `getOwner()`
`java.util.ArrayList<Part>` `getPartList()` The vehicle parts connected to this vehicle (Seats, wheels, etc)
`StorageVehicle` `getStorageVehicle()` The stored vehicle this vehicle is spawned from
`int` `getTaskID()`
`VehicleType` `getVehicleType()` The type of vehicle
`void` `removeVehicle(org.bukkit.entity.Player player)`
`void` `saveVehicle()`
`void` `setBaseVehicle(BaseVehicle baseVehicle)`
`void` `setBrakeForce(java.lang.Double brakeForce)` The brake force of the vehicle
`void` `setCollisionManager(CollisionManager collisionManager)` The collision manager of the vehicle
`void` `setHolder(org.bukkit.entity.ArmorStand holder)` The holder of the vehicle (The center)
`void` `setLocked(java.lang.Boolean locked)` Is this vehicle locked
`void` `setMomentum(java.util.List<org.bukkit.util.Vector> momentum)` Current momentum of the vehicle
`void` `setPartList(java.util.ArrayList<Part> partList)` The vehicle parts connected to this vehicle (Seats, wheels, etc)
`void` `setStorageVehicle(StorageVehicle storageVehicle)` The stored vehicle this vehicle is spawned from
`void` `setTaskID(int taskID)`
`void` `setVehicleType(VehicleType vehicleType)` The type of vehicle
`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.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Constructor Detail

#### SpawnedVehicle

    public SpawnedVehicle(StorageVehicle storageVehicle)

Constructor for new spawned vehicle

Parameters:
  `storageVehicle` - the storage vehicle containing the data to create a new spawned vehicle

#### SpawnedVehicle

    public SpawnedVehicle()

### Method Detail

#### fromString

    public static SpawnedVehicle fromString(org.bukkit.entity.ArmorStand holder,
                                            java.lang.String input,
                                            StorageVehicle storageVehicle)
                                     throws java.lang.ClassNotFoundException

load the spawnedvehicle based on data string

Parameters:
  `holder` - the armorstand holder of the vehicle
  `input` - the datastring
  `storageVehicle` - the storagevehicle it is linked to
Returns:
  a new SpawnedVehicle class with defined data
Throws:
  `java.lang.ClassNotFoundException` - exception

#### spawn

    public void spawn(org.bukkit.Location loc)

Spawn the spawnedvehicle

Parameters:
  `loc` - the location to spawn at

#### despawn

    public void despawn(boolean force)

Despawn a spawned vehicle

#### toString

    public java.lang.String toString()

Serialize spawnedvehicle to a string

Overrides:
  `toString` in class `java.lang.Object`
Returns:
  serialized data string

#### update

    public void update()

Update all positions (parts and skins) Handle collisions.

#### damage

    public void damage(int amount)

Damage the vehicle (If enabled)

Parameters:
  `amount` - the amount of damage

#### getCurrentSpeedInKm

    public int getCurrentSpeedInKm()

Get current speed in kilometers an hour

Returns:
  current speed in km/h

#### saveVehicle

    public void saveVehicle()

Specified by:
  `saveVehicle` in interface `IVehicle`

#### removeVehicle

    public void removeVehicle(org.bukkit.entity.Player player)

Specified by:
  `removeVehicle` in interface `IVehicle`

#### getOwner

    public java.lang.String getOwner()

Specified by:
  `getOwner` in interface `IVehicle`

#### getHolder

    public org.bukkit.entity.ArmorStand getHolder()

The holder of the vehicle (The center)

#### getPartList

    public java.util.ArrayList<Part> getPartList()

The vehicle parts connected to this vehicle (Seats, wheels, etc)

#### getStorageVehicle

    public StorageVehicle getStorageVehicle()

The stored vehicle this vehicle is spawned from

#### getLocked

    public java.lang.Boolean getLocked()

Is this vehicle locked

#### getTaskID

    public int getTaskID()

#### getMomentum

    public java.util.List<org.bukkit.util.Vector> getMomentum()

Current momentum of the vehicle

#### getVehicleType

    public VehicleType getVehicleType()

The type of vehicle

#### getBaseVehicle

    public BaseVehicle getBaseVehicle()

#### getBrakeForce

    public java.lang.Double getBrakeForce()

The brake force of the vehicle

#### getCollisionManager

    public CollisionManager getCollisionManager()

The collision manager of the vehicle

#### setHolder

    public void setHolder(org.bukkit.entity.ArmorStand holder)

The holder of the vehicle (The center)

#### setPartList

    public void setPartList(java.util.ArrayList<Part> partList)

The vehicle parts connected to this vehicle (Seats, wheels, etc)

#### setStorageVehicle

    public void setStorageVehicle(StorageVehicle storageVehicle)

The stored vehicle this vehicle is spawned from

#### setLocked

    public void setLocked(java.lang.Boolean locked)

Is this vehicle locked

#### setTaskID

    public void setTaskID(int taskID)

#### setMomentum

    public void setMomentum(java.util.List<org.bukkit.util.Vector> momentum)

Current momentum of the vehicle

#### setVehicleType

    public void setVehicleType(VehicleType vehicleType)

The type of vehicle

#### setBaseVehicle

    public void setBaseVehicle(BaseVehicle baseVehicle)

#### setBrakeForce

    public void setBrakeForce(java.lang.Double brakeForce)

The brake force of the vehicle

#### setCollisionManager

    public void setCollisionManager(CollisionManager collisionManager)

The collision manager of the vehicle