Constructor and Description |
---|
StorageVehicle() |
StorageVehicle(BaseVehicle baseVehicle,
java.lang.String playerUid)
Constructor to define a new StorageVehicle
|
Modifier and Type | Method and Description |
---|---|
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
|
public StorageVehicle(BaseVehicle baseVehicle, @Nullable java.lang.String playerUid)
baseVehicle
- the base type of vehicleplayerUid
- the owning playerpublic StorageVehicle()
public static StorageVehicle loadFromStorage(java.lang.String file)
file
- path of the yml file containing vehicle datapublic SpawnedVehicle spawnVehicle(org.bukkit.Location loc, SpawnMode spawnMode)
loc
- location to spawn atpublic void saveVehicle()
saveVehicle
in interface IVehicle
public void setNewOwner(org.bukkit.entity.Player oldOwner, org.bukkit.entity.Player newOwner)
oldOwner
- the old ownernewOwner
- the new ownerpublic void removeVehicle(org.bukkit.entity.Player owner)
removeVehicle
in interface IVehicle
owner
- owning playerpublic org.bukkit.Location getClosestSpawnPoint(org.bukkit.Location loc, java.lang.String type)
loc
- current locationtype
- spawnpoint typepublic java.util.List<java.lang.String> getInfoList()
public java.lang.String getName()
public java.lang.String getUuid()
public java.lang.String getBaseVehicle()
public java.lang.String getOwner()
public java.util.List<Part> getPartList()
public org.bukkit.util.Vector getLocation()
public java.lang.String getWorld()
public VehicleStats getVehicleStats()
public org.bukkit.inventory.Inventory getVehicleTrunk()
public SpawnedVehicle getSpawnedVehicle()
public void setName(java.lang.String name)
public void setUuid(java.lang.String uuid)
public void setBaseVehicle(java.lang.String baseVehicle)
public void setOwner(java.lang.String owner)
public void setPartList(java.util.List<Part> partList)
public void setLocation(org.bukkit.util.Vector location)
public void setWorld(java.lang.String world)
public void setVehicleStats(VehicleStats vehicleStats)
public void setVehicleTrunk(org.bukkit.inventory.Inventory vehicleTrunk)
public void setSpawnedVehicle(SpawnedVehicle spawnedVehicle)