Car dealer
Here's a sneak peek of what is a car dealer :
example_car_dealer:
camera:
==: org.bukkit.Location
world: world
x: -406
y: 80
z: 189
pitch: 36
yaw: -140
car_preview:
==: org.bukkit.Location
world: world
x: -402.5
y: 78.5
z: 185.5
pitch: 0.0
yaw: 0.0
vehicle_list: example_list
As you can see, each car dealers has its own name, camera and car preview locations, and a vehicle list assigned.
Add a vehicle list
Since a car dealer needs a vehicle list, lets set up one very quickly. Go open the file cardealer/vehicles.yml
.
example_list:
example_car:
vp_name: ExampleCar # VehiclesPlus' vehicle name
display_name: Voiture
description: Super chop elle fait vroum
price: 10000.0
The first node is the name of the list, then all of its children are different vehicles. You can add as many as you want.
Here we've got the example_car
, which is an ExampleCar named Voiture, with a cost of $10.000 and a little description.
Register a car dealer
In order to add a car dealer, you can use /cardealer add
in-game, if you have the permission vpp.admin
.
This command will require you to pass the car dealer's name and the vehicle list you want it to sell.
Once the command sent, you'll need first to set up the camera. To do so, just go at the place you want the player to be while previewing vehicles, and right-click.
Next, you'll need to setup the block where the vehicles are shown, the car preview. Like the previous time, just right-click on the block.
Opening a car dealer
And tada! Now you can open the instance by typing /cardealer open
, you'll need to pass a player and the car dealer's name, and the same permission vpp.admin
.
(Bonus) Opening a car dealer via NPC
If you use Citizens, you could easily create a NPC, select it then assign the command with /npc command add cardealer open <p> example_car_dealer
, where <p>
is the player who clicked.
Last updated