diff --git a/pom.xml b/pom.xml index d5af6b7..ad9bd79 100644 --- a/pom.xml +++ b/pom.xml @@ -6,14 +6,13 @@ tech.sbdevelopment VehiclesPlusConverter - 0.1.3 + 0.1.4 jar VehiclesPlusConverter Conversion plugin for v2 to v3. - 1.8 UTF-8 sbdevelopment.tech @@ -23,16 +22,15 @@ org.apache.maven.plugins maven-compiler-plugin - 3.8.1 + 3.13.0 - 10 - 10 + 11 org.apache.maven.plugins maven-shade-plugin - 3.2.4 + 3.6.0 package @@ -69,22 +67,22 @@ org.spigotmc spigot-api - 1.19.2-R0.1-SNAPSHOT + 1.21-R0.1-SNAPSHOT provided nl.sbdeveloper VehiclesPlus-v2 - 2.4.4.1 + 2.4.6.2 system - ${project.basedir}/src/libs/VehiclesPlus-2.4.4.1.jar + ${project.basedir}/src/libs/VehiclesPlus-2.4.6.2.jar nl.sbdeveloper VehiclesPlus-v3 3.0.0-SNAPSHOT system - ${project.basedir}/src/libs/VehiclesPlus-3.0.0-SNAPSHOT.jar + ${project.basedir}/src/libs/VehiclesPlus-3.0.0-SNAPSHOT-Clean.jar diff --git a/src/main/java/tech/sbdevelopment/vehiclesplusconverter/handlers/Converter.java b/src/main/java/tech/sbdevelopment/vehiclesplusconverter/handlers/Converter.java index d070067..82bd341 100644 --- a/src/main/java/tech/sbdevelopment/vehiclesplusconverter/handlers/Converter.java +++ b/src/main/java/tech/sbdevelopment/vehiclesplusconverter/handlers/Converter.java @@ -23,7 +23,6 @@ import nl.sbdeveloper.vehiclesplus.api.vehicles.settings.impl.*; import nl.sbdeveloper.vehiclesplus.storage.db.exceptions.DataStorageException; import nl.sbdeveloper.vehiclesplus.utils.jackson.ColorList; import org.bukkit.Bukkit; -import org.bukkit.Particle; import org.bukkit.command.CommandSender; import org.bukkit.scheduler.BukkitRunnable; import tech.sbdevelopment.vehiclesplusconverter.VehiclesPlusConverter; @@ -213,7 +212,7 @@ public class Converter { .horn(new Horn( baseVehicle.getHornSettings().getEnabled(), new Sounds.Sound( - baseVehicle.getHornSettings().getSound().name(), + baseVehicle.getHornSettings().getSound().parseSound().name(), 1 ) )) @@ -223,7 +222,7 @@ public class Converter { baseVehicle.getExhaustSettings().getXOffset(), baseVehicle.getExhaustSettings().getYOffset(), baseVehicle.getExhaustSettings().getZOffset(), - Particle.valueOf(baseVehicle.getExhaustSettings().getParticleName()) + baseVehicle.getExhaustSettings().getParticle().get() )) .exitWhileMoving(baseVehicle.getCanExitWhileMoving()) .price(baseVehicle.getPrice()) @@ -271,7 +270,9 @@ public class Converter { for (StorageVehicle vehicle : set.getValue()) { try { nl.sbdeveloper.vehiclesplus.api.vehicles.impl.StorageVehicle newVehicle = new nl.sbdeveloper.vehiclesplus.api.vehicles.impl.StorageVehicle( - 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())) + UUID.randomUUID(), + 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())), + false ); newVehicle.forceSave();