Compare commits

..

1 Commits

Author SHA1 Message Date
Stijn Bannink 11a8884afb
Bumped deps 2024-07-26 16:23:03 +02:00
2 changed files with 16 additions and 22 deletions

18
pom.xml
View File

@ -6,14 +6,13 @@
<groupId>tech.sbdevelopment</groupId>
<artifactId>VehiclesPlusConverter</artifactId>
<version>0.1.3</version>
<version>0.1.4</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>
@ -23,16 +22,15 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<version>3.13.0</version>
<configuration>
<source>10</source>
<target>10</target>
<release>11</release>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.4</version>
<version>3.6.0</version>
<executions>
<execution>
<phase>package</phase>
@ -69,22 +67,22 @@
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.19.2-R0.1-SNAPSHOT</version>
<version>1.21-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>nl.sbdeveloper</groupId>
<artifactId>VehiclesPlus-v2</artifactId>
<version>2.4.4.1</version>
<version>2.4.6.2</version>
<scope>system</scope>
<systemPath>${project.basedir}/src/libs/VehiclesPlus-2.4.4.1.jar</systemPath>
<systemPath>${project.basedir}/src/libs/VehiclesPlus-2.4.6.2.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.jar</systemPath>
<systemPath>${project.basedir}/src/libs/VehiclesPlus-3.0.0-SNAPSHOT-Clean.jar</systemPath>
</dependency>
</dependencies>
</project>

View File

@ -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())
@ -240,10 +239,9 @@ public class Converter {
))
.realisticSteering(baseVehicle.getSteeringType())
.permissions(Permissions.builder()
// this was hardcoded because if a config had no permission it produced a null pointer.
.buy("vp.buy." + baseVehicle.getName())
.ride("vp.ride." + baseVehicle.getName())
.sitWithoutRidePermission(false)
.buy(baseVehicle.getPermissions().getBuyPermission())
.ride(baseVehicle.getPermissions().getRidePermission())
.sitWithoutRidePermission(baseVehicle.getPermissions().getEnterWithoutRidePermission())
.adjust("vp.adjust." + baseVehicle.getName())
.spawn("vp.spawn." + baseVehicle.getName())
.build())
@ -251,10 +249,6 @@ public class Converter {
.gearbox(new Gearbox(true, 10))
.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());
} catch (Exception e) {
e.printStackTrace();
@ -276,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();