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>
|
<build>
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-compiler-plugin</artifactId>
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
<version>3.8.1</version>
|
<version>3.8.1</version>
|
||||||
|
@ -82,9 +82,9 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>nl.sbdeveloper</groupId>
|
<groupId>nl.sbdeveloper</groupId>
|
||||||
<artifactId>VehiclesPlus-v3</artifactId>
|
<artifactId>VehiclesPlus-v3</artifactId>
|
||||||
<version>3.0.0</version>
|
<version>3.0.0-SNAPSHOT</version>
|
||||||
<scope>system</scope>
|
<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>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</project>
|
</project>
|
||||||
|
|
|
@ -84,11 +84,11 @@ public class Converter {
|
||||||
|
|
||||||
private static void convertFuels() {
|
private static void convertFuels() {
|
||||||
for (Map.Entry<String, FuelType> entry : VehiclesPlus.getVehicleManager().getFuelTypeHashMap().entrySet()) {
|
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()
|
nl.sbdeveloper.vehiclesplus.api.vehicles.fuel.FuelType ft = new nl.sbdeveloper.vehiclesplus.api.vehicles.fuel.FuelType(
|
||||||
.name(entry.getValue().getName())
|
entry.getValue().getName(),
|
||||||
.item(entry.getValue().getFuelItem())
|
entry.getValue().getPricePerLiter(),
|
||||||
.pricePerLiter(entry.getValue().getPricePerLiter())
|
entry.getValue().getFuelItem()
|
||||||
.build();
|
);
|
||||||
|
|
||||||
nl.sbdeveloper.vehiclesplus.api.VehiclesPlusAPI.getFuelTypes().put(entry.getKey(), ft);
|
nl.sbdeveloper.vehiclesplus.api.VehiclesPlusAPI.getFuelTypes().put(entry.getKey(), ft);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
package tech.sbdevelopment.vehiclesplusconverter.utils;
|
package tech.sbdevelopment.vehiclesplusconverter.utils;
|
||||||
|
|
||||||
import net.md_5.bungee.api.ChatColor;
|
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.VehiclesPlusConverter;
|
||||||
import tech.sbdevelopment.vehiclesplusconverter.api.ConversionException;
|
import tech.sbdevelopment.vehiclesplusconverter.api.ConversionException;
|
||||||
import tech.sbdevelopment.vehiclesplusconverter.api.InvalidConversionException;
|
import tech.sbdevelopment.vehiclesplusconverter.api.InvalidConversionException;
|
||||||
|
@ -47,7 +47,7 @@ public class MainUtil {
|
||||||
File parentFolders = new File(nl.sbdeveloper.vehiclesplus.VehiclesPlus.getInstance().getDataFolder(), subFolder);
|
File parentFolders = new File(nl.sbdeveloper.vehiclesplus.VehiclesPlus.getInstance().getDataFolder(), subFolder);
|
||||||
if (!parentFolders.exists() && !parentFolders.mkdirs()) return;
|
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 {
|
try {
|
||||||
jsonFile.write(data);
|
jsonFile.write(data);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
|
|
Loading…
Reference in New Issue