java.lang.Object
me.legofreak107.vehiclesplus.vehicles.vehicles.objects.StorageVehicle
All Implemented Interfaces:
IVehicle

public class StorageVehicle extends Object implements IVehicle
  • Constructor Details

    • StorageVehicle

      public StorageVehicle(BaseVehicle baseVehicle, String playerUid)
      Constructor to define a new StorageVehicle
      Parameters:
      baseVehicle - the base type of vehicle
      playerUid - the owning player
    • StorageVehicle

      public StorageVehicle()
  • Method Details

    • loadFromStorage

      public static StorageVehicle loadFromStorage(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
    • getInfoList

      public List<String> getInfoList()
      Get a list of vehicle information, perfect for lores of items
      Returns:
      String list with info
    • getName

      public String getName()
      The name of the vehicle
    • getUuid

      public String getUuid()
      The name of the vehicle
    • getBaseVehicle

      public String getBaseVehicle()
      The name of the base vehicle
    • getOwner

      public String getOwner()
      The uuid of the owner
      Specified by:
      getOwner in interface IVehicle
    • getPartList

      public 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 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(String name)
      The name of the vehicle
    • setUuid

      public void setUuid(String uuid)
      The name of the vehicle
    • setBaseVehicle

      public void setBaseVehicle(String baseVehicle)
      The name of the base vehicle
    • setOwner

      public void setOwner(String owner)
      The uuid of the owner
    • setPartList

      public void setPartList(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(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