Compare commits

...

2 Commits

1 changed files with 8 additions and 3 deletions

View File

@ -240,9 +240,10 @@ public class Converter {
)) ))
.realisticSteering(baseVehicle.getSteeringType()) .realisticSteering(baseVehicle.getSteeringType())
.permissions(Permissions.builder() .permissions(Permissions.builder()
.buy(baseVehicle.getPermissions().getBuyPermission()) // this was hardcoded because if a config had no permission it produced a null pointer.
.ride(baseVehicle.getPermissions().getRidePermission()) .buy("vp.buy." + baseVehicle.getName())
.sitWithoutRidePermission(baseVehicle.getPermissions().getEnterWithoutRidePermission()) .ride("vp.ride." + baseVehicle.getName())
.sitWithoutRidePermission(false)
.adjust("vp.adjust." + baseVehicle.getName()) .adjust("vp.adjust." + baseVehicle.getName())
.spawn("vp.spawn." + baseVehicle.getName()) .spawn("vp.spawn." + baseVehicle.getName())
.build()) .build())
@ -250,6 +251,10 @@ public class Converter {
.gearbox(new Gearbox(true, 10)) .gearbox(new Gearbox(true, 10))
.build(); .build();
// Idk why but it was detecting type as "car" and it should be "cars" to work
if (model.getTypeId().equals("car"))
model.setTypeId("cars");
saveToVehiclesPlus(model, "vehicles/" + model.getTypeId(), model.getId()); saveToVehiclesPlus(model, "vehicles/" + model.getTypeId(), model.getId());
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();