Compare commits

..

No commits in common. "master" and "0.1.4" have entirely different histories.

2 changed files with 14 additions and 13 deletions

18
pom.xml
View File

@ -6,13 +6,14 @@
<groupId>tech.sbdevelopment</groupId>
<artifactId>VehiclesPlusConverter</artifactId>
<version>0.1.4</version>
<version>0.1.3</version>
<packaging>jar</packaging>
<name>VehiclesPlusConverter</name>
<description>Conversion plugin for v2 to v3.</description>
<properties>
<java.version>1.8</java.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<url>sbdevelopment.tech</url>
@ -22,15 +23,16 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.13.0</version>
<version>3.8.1</version>
<configuration>
<release>11</release>
<source>10</source>
<target>10</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.6.0</version>
<version>3.2.4</version>
<executions>
<execution>
<phase>package</phase>
@ -67,22 +69,22 @@
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.21-R0.1-SNAPSHOT</version>
<version>1.19.2-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>nl.sbdeveloper</groupId>
<artifactId>VehiclesPlus-v2</artifactId>
<version>2.4.6.2</version>
<version>2.4.4.1</version>
<scope>system</scope>
<systemPath>${project.basedir}/src/libs/VehiclesPlus-2.4.6.2.jar</systemPath>
<systemPath>${project.basedir}/src/libs/VehiclesPlus-2.4.4.1.jar</systemPath>
</dependency>
<dependency>
<groupId>nl.sbdeveloper</groupId>
<artifactId>VehiclesPlus-v3</artifactId>
<version>3.0.0-SNAPSHOT</version>
<scope>system</scope>
<systemPath>${project.basedir}/src/libs/VehiclesPlus-3.0.0-SNAPSHOT-Clean.jar</systemPath>
<systemPath>${project.basedir}/src/libs/VehiclesPlus-3.0.0-SNAPSHOT.jar</systemPath>
</dependency>
</dependencies>
</project>

View File

@ -23,6 +23,7 @@ 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;
@ -212,7 +213,7 @@ public class Converter {
.horn(new Horn(
baseVehicle.getHornSettings().getEnabled(),
new Sounds.Sound(
baseVehicle.getHornSettings().getSound().parseSound().name(),
baseVehicle.getHornSettings().getSound().name(),
1
)
))
@ -222,7 +223,7 @@ public class Converter {
baseVehicle.getExhaustSettings().getXOffset(),
baseVehicle.getExhaustSettings().getYOffset(),
baseVehicle.getExhaustSettings().getZOffset(),
baseVehicle.getExhaustSettings().getParticle().get()
Particle.valueOf(baseVehicle.getExhaustSettings().getParticleName())
))
.exitWhileMoving(baseVehicle.getCanExitWhileMoving())
.price(baseVehicle.getPrice())
@ -270,9 +271,7 @@ 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(
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
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.forceSave();