java.lang.Object
nl.mtvehicles.core.infrastructure.models.Vehicle

public class Vehicle extends Object
Vehicle with its specifications
BEWARE! THIS IS IMPORTANT:
This class may be moved in v2.5.0. Bear it in mind if you're using it in your addon.
  • Field Details

  • Constructor Details

    • Vehicle

      public Vehicle()
  • Method Details

    • save

      public void save()
      Save the vehicle specifications (and possible adjustments) to vehicleData.yml
    • delete

      public void delete() throws IllegalStateException
      Delete a vehicle from the database (vehicleData.yml)
      Throws:
      IllegalStateException - If vehicle is already deleted.
    • getLicensePlate

      public String getLicensePlate()
    • setLicensePlate

      public void setLicensePlate(String licensePlate)
    • getName

      public String getName()
    • getSkinDamage

      public int getSkinDamage()
    • getSkinItem

      public String getSkinItem()
    • isGlow

      public boolean isGlow()
    • isOpen

      public boolean isOpen()
    • isFuelEnabled

      public boolean isFuelEnabled()
    • isHornEnabled

      public boolean isHornEnabled()
    • getHealth

      public double getHealth()
    • getFuel

      public double getFuel()
    • isTrunkEnabled

      public boolean isTrunkEnabled()
    • getTrunkRows

      public int getTrunkRows()
    • getAccelerationSpeed

      public double getAccelerationSpeed()
    • getMaxSpeed

      public double getMaxSpeed()
    • getBrakingSpeed

      public double getBrakingSpeed()
    • getFrictionSpeed

      public double getFrictionSpeed()
    • getRotateSpeed

      public int getRotateSpeed()
    • getMaxSpeedBackwards

      public double getMaxSpeedBackwards()
    • getOwnerUUIDString

      @Deprecated public String getOwnerUUIDString()
      Deprecated.
      Use getOwnerUUID() instead.
    • getOwnerUUID

      public UUID getOwnerUUID()
    • getOwnerName

      public String getOwnerName()
    • isOwner

      public boolean isOwner(org.bukkit.OfflinePlayer player)
    • getNbtValue

      public String getNbtValue()
    • getRiders

      public List<String> getRiders()
    • getMembers

      public List<String> getMembers()
    • getFuelUsage

      public double getFuelUsage()
    • setName

      public void setName(String name)
    • setSkinDamage

      public void setSkinDamage(int skinDamage)
    • setSkinItem

      public void setSkinItem(String skinItem)
    • setGlow

      public void setGlow(boolean glow)
    • setOpen

      public void setOpen(boolean open)
    • setBenzineEnabled

      public void setBenzineEnabled(boolean benzineEnabled)
    • setHornEnabled

      public void setHornEnabled(boolean hornEnabled)
    • setHealth

      public void setHealth(double health)
    • setFuel

      public void setFuel(double fuel)
    • setTrunk

      public void setTrunk(boolean trunk)
    • setTrunkRows

      public void setTrunkRows(int trunkRows)
    • getTrunkData

      public List<String> getTrunkData()
    • setTrunkData

      public void setTrunkData(List<String> trunkData)
    • setAccelerationSpeed

      public void setAccelerationSpeed(double accelerationSpeed)
    • setMaxSpeed

      public void setMaxSpeed(double maxSpeed)
    • setBrakingSpeed

      public void setBrakingSpeed(double brakingSpeed)
    • setFrictionSpeed

      public void setFrictionSpeed(double frictionSpeed)
    • setRotateSpeed

      public void setRotateSpeed(int rotateSpeed)
    • setMaxSpeedBackwards

      public void setMaxSpeedBackwards(double maxSpeedBackwards)
    • setOwner

      @Deprecated public void setOwner(String ownerUUID)
      Deprecated.
      Use setOwner(UUID) instead.
    • setOwner

      public void setOwner(UUID owner)
    • setNbtValue

      public void setNbtValue(String nbt)
    • setRiders

      public void setRiders(List<String> riders)
    • setMembers

      public void setMembers(List<String> members)
    • setFuelUsage

      public void setFuelUsage(double fuelUsage)
    • getVehicleData

      public Map<?,​?> getVehicleData()
    • setVehicleData

      public void setVehicleData(Map<?,​?> vehicleData)
    • canRide

      public boolean canRide(org.bukkit.entity.Player player)
    • canSit

      public boolean canSit(org.bukkit.entity.Player player)
    • getVehicleType

      public VehicleType getVehicleType()
    • setVehicleType

      @Deprecated public void setVehicleType(String vehicleType)
      Deprecated.
    • setVehicleType

      public void setVehicleType(VehicleType vehicleType)