Class StorageVehicle
java.lang.Object
me.legofreak107.vehiclesplus.vehicles.vehicles.objects.StorageVehicle
- All Implemented Interfaces:
IVehicle
-
Constructor Summary
ConstructorsConstructorDescriptionStorageVehicle(BaseVehicle baseVehicle, String playerUid) Constructor to define a new StorageVehicle -
Method Summary
Modifier and TypeMethodDescriptionThe name of the base vehicleGet a list of vehicle information, perfect for lores of itemsorg.bukkit.util.VectorThe location of the vehicle in the worldgetName()The name of the vehiclegetOwner()The uuid of the ownerA list of parts connected to this vehicle (Wheels, seats, etc)The spawned version of this storage vehiclegetUuid()The name of the vehicleThe stats of the vehicleorg.bukkit.inventory.InventoryThe trunk of the vehiclegetWorld()The world location of the vehiclestatic StorageVehicleloadFromStorage(String file) Load a vehicle from storage filevoidremoveVehicle(org.bukkit.entity.Player owner) Delete this vehicle from storage.voidUpdate this vehicles data to file systemvoidsetBaseVehicle(String baseVehicle) The name of the base vehiclevoidsetLocation(org.bukkit.util.Vector location) The location of the vehicle in the worldvoidThe name of the vehiclevoidsetNewOwner(org.bukkit.entity.Player oldOwner, org.bukkit.entity.Player newOwner) Change vehicle ownershipvoidThe uuid of the ownervoidsetPartList(List<Part> partList) A list of parts connected to this vehicle (Wheels, seats, etc)voidsetSpawnedVehicle(SpawnedVehicle spawnedVehicle) The spawned version of this storage vehiclevoidThe name of the vehiclevoidsetVehicleStats(VehicleStats vehicleStats) The stats of the vehiclevoidsetVehicleTrunk(org.bukkit.inventory.Inventory vehicleTrunk) The trunk of the vehiclevoidThe world location of the vehiclespawnVehicle(org.bukkit.Location loc, SpawnMode spawnMode) Spawn this vehicle
-
Constructor Details
-
StorageVehicle
Constructor to define a new StorageVehicle- Parameters:
baseVehicle- the base type of vehicleplayerUid- the owning player
-
StorageVehicle
public StorageVehicle()
-
-
Method Details
-
loadFromStorage
Load a vehicle from storage file- Parameters:
file- path of the yml file containing vehicle data- Returns:
- StorageVehicle
-
spawnVehicle
Spawn this vehicle- Parameters:
loc- location to spawn at- Returns:
- SpawnedVehicle
-
saveVehicle
public void saveVehicle()Update this vehicles data to file system- Specified by:
saveVehiclein interfaceIVehicle
-
setNewOwner
public void setNewOwner(org.bukkit.entity.Player oldOwner, org.bukkit.entity.Player newOwner) Change vehicle ownership- Parameters:
oldOwner- the old ownernewOwner- the new owner
-
removeVehicle
public void removeVehicle(org.bukkit.entity.Player owner) Delete this vehicle from storage.- Specified by:
removeVehiclein interfaceIVehicle- Parameters:
owner- owning player
-
getInfoList
Get a list of vehicle information, perfect for lores of items- Returns:
- String list with info
-
getName
The name of the vehicle -
getUuid
The name of the vehicle -
getBaseVehicle
The name of the base vehicle -
getOwner
The uuid of the owner -
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
The world location of the vehicle -
getVehicleStats
The stats of the vehicle -
getVehicleTrunk
public org.bukkit.inventory.Inventory getVehicleTrunk()The trunk of the vehicle -
getSpawnedVehicle
The spawned version of this storage vehicle -
setName
The name of the vehicle -
setUuid
The name of the vehicle -
setBaseVehicle
The name of the base vehicle -
setOwner
The uuid of the owner -
setPartList
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
The world location of the vehicle -
setVehicleStats
The stats of the vehicle -
setVehicleTrunk
public void setVehicleTrunk(org.bukkit.inventory.Inventory vehicleTrunk) The trunk of the vehicle -
setSpawnedVehicle
The spawned version of this storage vehicle
-