diff --git a/pom.xml b/pom.xml index 2e705bc..d5af6b7 100644 --- a/pom.xml +++ b/pom.xml @@ -75,16 +75,16 @@ nl.sbdeveloper VehiclesPlus-v2 - 2.3.5 + 2.4.4.1 system - ${project.basedir}/src/libs/VehiclesPlus-2.3.5.jar + ${project.basedir}/src/libs/VehiclesPlus-2.4.4.1.jar nl.sbdeveloper VehiclesPlus-v3 - 3.0.0-PRE3 + 3.0.0-SNAPSHOT system - ${project.basedir}/src/libs/VehiclesPlus-3.0.0-PRE3.jar + ${project.basedir}/src/libs/VehiclesPlus-3.0.0-SNAPSHOT.jar diff --git a/renovate.json b/renovate.json new file mode 100644 index 0000000..7190a60 --- /dev/null +++ b/renovate.json @@ -0,0 +1,3 @@ +{ + "$schema": "https://docs.renovatebot.com/renovate-schema.json" +} diff --git a/src/main/java/tech/sbdevelopment/vehiclesplusconverter/handlers/Converter.java b/src/main/java/tech/sbdevelopment/vehiclesplusconverter/handlers/Converter.java index ca8facc..d55cc54 100644 --- a/src/main/java/tech/sbdevelopment/vehiclesplusconverter/handlers/Converter.java +++ b/src/main/java/tech/sbdevelopment/vehiclesplusconverter/handlers/Converter.java @@ -176,8 +176,9 @@ public class Converter { wheel.getXOffset(), wheel.getYOffset(), wheel.getZOffset(), - VehiclesPlus.getVehicleManager().getRimDesignHashMap().values().stream().findFirst().orElseThrow(() -> new ConversionException("No RimDesign found while loading Wheel in file", baseVehicle.getName())).getName(), + nl.sbdeveloper.vehiclesplus.api.VehiclesPlusAPI.getRimDesign(VehiclesPlus.getVehicleManager().getRimDesignHashMap().values().stream().findFirst().orElseThrow(() -> new ConversionException("No RimDesign found while loading Wheel in file", baseVehicle.getName())).getName()).orElseThrow(() -> new ConversionException("No matching RimDesign found while loading Wheel in file", baseVehicle.getName())), wheel.getColor(), + HolderItemPosition.HEAD, wheel.getSteering(), wheel.getRotationOffset() )); @@ -266,7 +267,7 @@ public class Converter { UUID ownerUUID = set.getKey(); String ownerName = Bukkit.getOfflinePlayer(ownerUUID).getName(); if (ownerName == null) { - Bukkit.getLogger().severe("Could not convert vehicle for player with UUID " + ownerUUID + ", the player name is unknown!"); + Bukkit.getLogger().severe("Could not convert vehicles for player with UUID " + ownerUUID + ", the player name is unknown!"); continue; } @@ -278,16 +279,16 @@ public class Converter { nl.sbdeveloper.vehiclesplus.api.VehiclesPlusAPI.getVehicleModels().values().stream().filter(v -> v.getId().equalsIgnoreCase(vehicle.getBaseVehicle())).findFirst().orElseThrow(() -> new ConversionException("No VehicleModel found for", vehicle.getUuid())) ); - newVehicle.save(); + newVehicle.forceSave(); garage.addVehicle(newVehicle.getUuid()); } catch (Exception e) { e.printStackTrace(); - Bukkit.getLogger().severe("Could not convert vehicle for player with UUID " + ownerUUID + ", could not save the vehicle!"); + Bukkit.getLogger().severe("Could not convert vehicles for player with UUID " + ownerUUID + ", could not save the vehicle!"); } } try { - garage.save(); + garage.forceSave(); } catch (DataStorageException e) { e.printStackTrace(); Bukkit.getLogger().severe("Could not convert vehicles for player with UUID " + ownerUUID + ", could not save the garage!"); diff --git a/src/main/java/tech/sbdevelopment/vehiclesplusconverter/utils/MainUtil.java b/src/main/java/tech/sbdevelopment/vehiclesplusconverter/utils/MainUtil.java index 8b96e0c..08814e3 100644 --- a/src/main/java/tech/sbdevelopment/vehiclesplusconverter/utils/MainUtil.java +++ b/src/main/java/tech/sbdevelopment/vehiclesplusconverter/utils/MainUtil.java @@ -27,17 +27,17 @@ public class MainUtil { public static String getTypeIdByClass(String baseVehicle, String type) throws ConversionException { switch (type) { case "BikeType": - return "bike"; + return "bikes"; case "BoatType": - return "boat"; + return "boats"; case "CarType": - return "car"; + return "cars"; case "HelicopterType": - return "helicopter"; + return "helicopters"; case "HovercraftType": - return "hovercraft"; + return "hovercrafts"; case "PlaneType": - return "plane"; + return "planes"; default: throw new InvalidConversionException("vehicleType", baseVehicle); }