Class VehicleModel.Builder
java.lang.Object
nl.sbdeveloper.vehiclesplus.api.vehicles.VehicleModel.Builder
- Enclosing class:
VehicleModel
The builder class for constructing
VehicleModel
instances.-
Method Summary
Modifier and TypeMethodDescriptionacceleration
(UpgradableSetting acceleration) Sets the acceleration setting.availableColors
(nl.sbdeveloper.vehiclesplus.utils.jackson.ColorList availableColors) Sets the available colors for the vehicle model.build()
Builds and returns theVehicleModel
instance.displayName
(String displayName) Sets the display name of the vehicle model.drift
(boolean drift) Enables or disables drifting capability.Sets the exhaust system for the vehicle.exitWhileMoving
(boolean exitWhileMoving) Allows exiting the vehicle while moving.Sets the fuel type of the vehicle.fuelTank
(UpgradableSetting fuelTank) Sets the fuel tank capacity.Sets the gearbox for the vehicle.health
(int health) Sets the health points of the vehicle.heightLimit
(HeightLimit heightLimit) Sets the height limit for the vehicle.Sets the hitbox for the vehicle model.Sets the horn for the vehicle.Sets the ID of the vehicle model.maxSpeed
(UpgradableSetting maxSpeed) Sets the maximum speed setting.Adds a single part to the vehicle model.Adds multiple parts to the vehicle model.permissions
(Permissions permissions) Sets the permissions for the vehicle model.price
(double price) Sets the price of the vehicle model.realisticSteering
(boolean realisticSteering) Enables or disables realistic steering.Sets the vehicle sounds.trunkSize
(int trunkSize) Sets the trunk size of the vehicle.turningRadius
(UpgradableSetting turningRadius) Sets the turning radius.Sets the type ID of the vehicle model.typeStrategies
(MovementStrategy... typeStrategies) Adds movement strategies to the vehicle.
-
Method Details
-
id
Sets the ID of the vehicle model.- Parameters:
id
- The unique identifier.- Returns:
- The builder instance.
-
displayName
Sets the display name of the vehicle model.- Parameters:
displayName
- The human-readable name.- Returns:
- The builder instance.
-
typeId
Sets the type ID of the vehicle model.- Parameters:
typeId
- The type identifier.- Returns:
- The builder instance.
-
price
Sets the price of the vehicle model.- Parameters:
price
- The cost of the vehicle.- Returns:
- The builder instance.
-
permissions
Sets the permissions for the vehicle model.- Parameters:
permissions
- The permissions object.- Returns:
- The builder instance.
-
availableColors
public VehicleModel.Builder availableColors(nl.sbdeveloper.vehiclesplus.utils.jackson.ColorList availableColors) Sets the available colors for the vehicle model.- Parameters:
availableColors
- A list of available colors.- Returns:
- The builder instance.
-
parts
Adds multiple parts to the vehicle model.- Parameters:
parts
- The list of parts to add.- Returns:
- The builder instance.
-
part
Adds a single part to the vehicle model.- Parameters:
part
- The part to add.- Returns:
- The builder instance.
-
maxSpeed
Sets the maximum speed setting.- Parameters:
maxSpeed
- The upgradable speed setting.- Returns:
- The builder instance.
-
fuelTank
Sets the fuel tank capacity.- Parameters:
fuelTank
- The upgradable fuel tank setting.- Returns:
- The builder instance.
-
turningRadius
Sets the turning radius.- Parameters:
turningRadius
- The upgradable turning radius setting.- Returns:
- The builder instance.
-
acceleration
Sets the acceleration setting.- Parameters:
acceleration
- The upgradable acceleration setting.- Returns:
- The builder instance.
-
hitbox
Sets the hitbox for the vehicle model.- Parameters:
hitbox
- The hitbox object.- Returns:
- The builder instance.
-
fuel
Sets the fuel type of the vehicle.- Parameters:
fuel
- The fuel object.- Returns:
- The builder instance.
-
exhaust
Sets the exhaust system for the vehicle.- Parameters:
exhaust
- The exhaust object.- Returns:
- The builder instance.
-
horn
Sets the horn for the vehicle.- Parameters:
horn
- The horn object.- Returns:
- The builder instance.
-
sounds
Sets the vehicle sounds.- Parameters:
sounds
- The sounds object.- Returns:
- The builder instance.
-
heightLimit
Sets the height limit for the vehicle.- Parameters:
heightLimit
- The height limit object.- Returns:
- The builder instance.
-
realisticSteering
Enables or disables realistic steering.- Parameters:
realisticSteering
- Boolean flag for realistic steering.- Returns:
- The builder instance.
-
trunkSize
Sets the trunk size of the vehicle.- Parameters:
trunkSize
- The size of the trunk.- Returns:
- The builder instance.
-
drift
Enables or disables drifting capability.- Parameters:
drift
- Boolean flag for drifting.- Returns:
- The builder instance.
-
exitWhileMoving
Allows exiting the vehicle while moving.- Parameters:
exitWhileMoving
- Boolean flag for exit while moving.- Returns:
- The builder instance.
-
health
Sets the health points of the vehicle.- Parameters:
health
- The health value.- Returns:
- The builder instance.
-
gearbox
Sets the gearbox for the vehicle.- Parameters:
gearbox
- The gearbox object.- Returns:
- The builder instance.
-
typeStrategies
Adds movement strategies to the vehicle.- Parameters:
typeStrategies
- The movement strategies.- Returns:
- The builder instance.
-
build
Builds and returns theVehicleModel
instance.- Returns:
- The constructed vehicle model.
-