Compare commits

..

No commits in common. "861b5b378f9d1fbd95771ac3c3f2fa7205ae4028" and "b42876541fb606d31c00f889bb8d2b21d9c8f53f" have entirely different histories.

4 changed files with 15 additions and 19 deletions

View File

@ -75,16 +75,16 @@
<dependency>
<groupId>nl.sbdeveloper</groupId>
<artifactId>VehiclesPlus-v2</artifactId>
<version>2.4.4.1</version>
<version>2.3.5</version>
<scope>system</scope>
<systemPath>${project.basedir}/src/libs/VehiclesPlus-2.4.4.1.jar</systemPath>
<systemPath>${project.basedir}/src/libs/VehiclesPlus-2.3.5.jar</systemPath>
</dependency>
<dependency>
<groupId>nl.sbdeveloper</groupId>
<artifactId>VehiclesPlus-v3</artifactId>
<version>3.0.0-SNAPSHOT</version>
<version>3.0.0-PRE3</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-PRE3.jar</systemPath>
</dependency>
</dependencies>
</project>

View File

@ -1,3 +0,0 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json"
}

View File

@ -176,9 +176,8 @@ public class Converter {
wheel.getXOffset(),
wheel.getYOffset(),
wheel.getZOffset(),
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())),
VehiclesPlus.getVehicleManager().getRimDesignHashMap().values().stream().findFirst().orElseThrow(() -> new ConversionException("No RimDesign found while loading Wheel in file", baseVehicle.getName())).getName(),
wheel.getColor(),
HolderItemPosition.HEAD,
wheel.getSteering(),
wheel.getRotationOffset()
));
@ -267,7 +266,7 @@ public class Converter {
UUID ownerUUID = set.getKey();
String ownerName = Bukkit.getOfflinePlayer(ownerUUID).getName();
if (ownerName == null) {
Bukkit.getLogger().severe("Could not convert vehicles for player with UUID " + ownerUUID + ", the player name is unknown!");
Bukkit.getLogger().severe("Could not convert vehicle for player with UUID " + ownerUUID + ", the player name is unknown!");
continue;
}
@ -279,16 +278,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.forceSave();
newVehicle.save();
garage.addVehicle(newVehicle.getUuid());
} catch (Exception e) {
e.printStackTrace();
Bukkit.getLogger().severe("Could not convert vehicles for player with UUID " + ownerUUID + ", could not save the vehicle!");
Bukkit.getLogger().severe("Could not convert vehicle for player with UUID " + ownerUUID + ", could not save the vehicle!");
}
}
try {
garage.forceSave();
garage.save();
} catch (DataStorageException e) {
e.printStackTrace();
Bukkit.getLogger().severe("Could not convert vehicles for player with UUID " + ownerUUID + ", could not save the garage!");

View File

@ -27,17 +27,17 @@ public class MainUtil {
public static String getTypeIdByClass(String baseVehicle, String type) throws ConversionException {
switch (type) {
case "BikeType":
return "bikes";
return "bike";
case "BoatType":
return "boats";
return "boat";
case "CarType":
return "cars";
return "car";
case "HelicopterType":
return "helicopters";
return "helicopter";
case "HovercraftType":
return "hovercrafts";
return "hovercraft";
case "PlaneType":
return "planes";
return "plane";
default:
throw new InvalidConversionException("vehicleType", baseVehicle);
}