forked from SBDevelopment/VehiclesPlusConverter
Updated to v3 PRE1 alpha release
This commit is contained in:
parent
12d18d3d69
commit
a5ae8c9620
6
pom.xml
6
pom.xml
|
@ -20,7 +20,7 @@
|
|||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>3.8.1</version>
|
||||
|
@ -82,9 +82,9 @@
|
|||
<dependency>
|
||||
<groupId>nl.sbdeveloper</groupId>
|
||||
<artifactId>VehiclesPlus-v3</artifactId>
|
||||
<version>3.0.0</version>
|
||||
<version>3.0.0-SNAPSHOT</version>
|
||||
<scope>system</scope>
|
||||
<systemPath>${project.basedir}/src/libs/VehiclesPlus-3.0.0.jar</systemPath>
|
||||
<systemPath>${project.basedir}/src/libs/VehiclesPlus-3.0.0-SNAPSHOT.jar</systemPath>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
|
|
|
@ -84,11 +84,11 @@ public class Converter {
|
|||
|
||||
private static void convertFuels() {
|
||||
for (Map.Entry<String, FuelType> entry : VehiclesPlus.getVehicleManager().getFuelTypeHashMap().entrySet()) {
|
||||
nl.sbdeveloper.vehiclesplus.api.vehicles.fuel.FuelType ft = nl.sbdeveloper.vehiclesplus.api.vehicles.fuel.FuelType.builder()
|
||||
.name(entry.getValue().getName())
|
||||
.item(entry.getValue().getFuelItem())
|
||||
.pricePerLiter(entry.getValue().getPricePerLiter())
|
||||
.build();
|
||||
nl.sbdeveloper.vehiclesplus.api.vehicles.fuel.FuelType ft = new nl.sbdeveloper.vehiclesplus.api.vehicles.fuel.FuelType(
|
||||
entry.getValue().getName(),
|
||||
entry.getValue().getPricePerLiter(),
|
||||
entry.getValue().getFuelItem()
|
||||
);
|
||||
|
||||
nl.sbdeveloper.vehiclesplus.api.VehiclesPlusAPI.getFuelTypes().put(entry.getKey(), ft);
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package tech.sbdevelopment.vehiclesplusconverter.utils;
|
||||
|
||||
import net.md_5.bungee.api.ChatColor;
|
||||
import nl.sbdeveloper.vehiclesplus.storage.file.JSONFile;
|
||||
import nl.sbdeveloper.vehiclesplus.storage.file.HJSONFile;
|
||||
import tech.sbdevelopment.vehiclesplusconverter.VehiclesPlusConverter;
|
||||
import tech.sbdevelopment.vehiclesplusconverter.api.ConversionException;
|
||||
import tech.sbdevelopment.vehiclesplusconverter.api.InvalidConversionException;
|
||||
|
@ -47,7 +47,7 @@ public class MainUtil {
|
|||
File parentFolders = new File(nl.sbdeveloper.vehiclesplus.VehiclesPlus.getInstance().getDataFolder(), subFolder);
|
||||
if (!parentFolders.exists() && !parentFolders.mkdirs()) return;
|
||||
|
||||
JSONFile jsonFile = new JSONFile(nl.sbdeveloper.vehiclesplus.VehiclesPlus.getInstance(), subFolder + "/" + fileName);
|
||||
HJSONFile jsonFile = new HJSONFile(nl.sbdeveloper.vehiclesplus.VehiclesPlus.getInstance(), subFolder + "/" + fileName);
|
||||
try {
|
||||
jsonFile.write(data);
|
||||
} catch (IOException e) {
|
||||
|
|
Loading…
Reference in New Issue