me.legofreak107.vehiclesplus.vehicles.vehicles.objects

## Class StorageVehicle

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

All Implemented Interfaces:
  IVehicle

    public class StorageVehicle
    extends java.lang.Object
    implements IVehicle

### Constructor Summary

Constructors
Constructor and Description
`StorageVehicle()`
`StorageVehicle(BaseVehicle baseVehicle, java.lang.String playerUid)` Constructor to define a new StorageVehicle

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`java.lang.String` `getBaseVehicle()` The name of the base vehicle
`org.bukkit.Location` `getClosestSpawnPoint(org.bukkit.Location loc, java.lang.String type)` Get closest spawnpoint from current location
`java.util.List<java.lang.String>` `getInfoList()` Get a list of vehicle information, perfect for lores of items
`org.bukkit.util.Vector` `getLocation()` The location of the vehicle in the world
`java.lang.String` `getName()` The name of the vehicle
`java.lang.String` `getOwner()` The uuid of the owner
`java.util.List<Part>` `getPartList()` A list of parts connected to this vehicle (Wheels, seats, etc)
`SpawnedVehicle` `getSpawnedVehicle()` The spawned version of this storage vehicle
`java.lang.String` `getUuid()` The name of the vehicle
`VehicleStats` `getVehicleStats()` The stats of the vehicle
`org.bukkit.inventory.Inventory` `getVehicleTrunk()` The trunk of the vehicle
`java.lang.String` `getWorld()` The world location of the vehicle
`static StorageVehicle` `loadFromStorage(java.lang.String file)` Load a vehicle from storage file
`void` `removeVehicle(org.bukkit.entity.Player owner)` Delete this vehicle from storage.
`void` `saveVehicle()` Update this vehicles data to file system
`void` `setBaseVehicle(java.lang.String baseVehicle)` The name of the base vehicle
`void` `setLocation(org.bukkit.util.Vector location)` The location of the vehicle in the world
`void` `setName(java.lang.String name)` The name of the vehicle
`void` `setNewOwner(org.bukkit.entity.Player oldOwner, org.bukkit.entity.Player newOwner)` Change vehicle ownership
`void` `setOwner(java.lang.String owner)` The uuid of the owner
`void` `setPartList(java.util.List<Part> partList)` A list of parts connected to this vehicle (Wheels, seats, etc)
`void` `setSpawnedVehicle(SpawnedVehicle spawnedVehicle)` The spawned version of this storage vehicle
`void` `setUuid(java.lang.String uuid)` The name of the vehicle
`void` `setVehicleStats(VehicleStats vehicleStats)` The stats of the vehicle
`void` `setVehicleTrunk(org.bukkit.inventory.Inventory vehicleTrunk)` The trunk of the vehicle
`void` `setWorld(java.lang.String world)` The world location of the vehicle
`SpawnedVehicle` `spawnVehicle(org.bukkit.Location loc, SpawnMode spawnMode)` Spawn this vehicle

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

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

### Constructor Detail

#### StorageVehicle

    public StorageVehicle(BaseVehicle baseVehicle,
                          @Nullable
                          java.lang.String playerUid)

Constructor to define a new StorageVehicle

Parameters:
  `baseVehicle` - the base type of vehicle
  `playerUid` - the owning player

#### StorageVehicle

    public StorageVehicle()

### Method Detail

#### loadFromStorage

    public static StorageVehicle loadFromStorage(java.lang.String file)

Load a vehicle from storage file

Parameters:
  `file` - path of the yml file containing vehicle data
Returns:
  StorageVehicle

#### spawnVehicle

    public SpawnedVehicle spawnVehicle(org.bukkit.Location loc,
                                       SpawnMode spawnMode)

Spawn this vehicle

Parameters:
  `loc` - location to spawn at
Returns:
  SpawnedVehicle

#### saveVehicle

    public void saveVehicle()

Update this vehicles data to file system

Specified by:
  `saveVehicle` in interface `IVehicle`

#### setNewOwner

    public void setNewOwner(org.bukkit.entity.Player oldOwner,
                            org.bukkit.entity.Player newOwner)

Change vehicle ownership

Parameters:
  `oldOwner` - the old owner
  `newOwner` - the new owner

#### removeVehicle

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

Delete this vehicle from storage.

Specified by:
  `removeVehicle` in interface `IVehicle`
Parameters:
  `owner` - owning player

#### getClosestSpawnPoint

    public org.bukkit.Location getClosestSpawnPoint(org.bukkit.Location loc,
                                                    java.lang.String type)

Get closest spawnpoint from current location

Parameters:
  `loc` - current location
  `type` - spawnpoint type
Returns:
  location

#### getInfoList

    public java.util.List<java.lang.String> getInfoList()

Get a list of vehicle information, perfect for lores of items

Returns:
  String list with info

#### getName

    public java.lang.String getName()

The name of the vehicle

#### getUuid

    public java.lang.String getUuid()

The name of the vehicle

#### getBaseVehicle

    public java.lang.String getBaseVehicle()

The name of the base vehicle

#### getOwner

    public java.lang.String getOwner()

The uuid of the owner

Specified by:
  `getOwner` in interface `IVehicle`

#### getPartList

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

A list of parts connected to this vehicle (Wheels, seats, etc)

#### getLocation

    public org.bukkit.util.Vector getLocation()

The location of the vehicle in the world

#### getWorld

    public java.lang.String getWorld()

The world location of the vehicle

#### getVehicleStats

    public VehicleStats getVehicleStats()

The stats of the vehicle

#### getVehicleTrunk

    public org.bukkit.inventory.Inventory getVehicleTrunk()

The trunk of the vehicle

#### getSpawnedVehicle

    public SpawnedVehicle getSpawnedVehicle()

The spawned version of this storage vehicle

#### setName

    public void setName(java.lang.String name)

The name of the vehicle

#### setUuid

    public void setUuid(java.lang.String uuid)

The name of the vehicle

#### setBaseVehicle

    public void setBaseVehicle(java.lang.String baseVehicle)

The name of the base vehicle

#### setOwner

    public void setOwner(java.lang.String owner)

The uuid of the owner

#### setPartList

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

A list of parts connected to this vehicle (Wheels, seats, etc)

#### setLocation

    public void setLocation(org.bukkit.util.Vector location)

The location of the vehicle in the world

#### setWorld

    public void setWorld(java.lang.String world)

The world location of the vehicle

#### setVehicleStats

    public void setVehicleStats(VehicleStats vehicleStats)

The stats of the vehicle

#### setVehicleTrunk

    public void setVehicleTrunk(org.bukkit.inventory.Inventory vehicleTrunk)

The trunk of the vehicle

#### setSpawnedVehicle

    public void setSpawnedVehicle(SpawnedVehicle spawnedVehicle)

The spawned version of this storage vehicle