summaryrefslogtreecommitdiffstats
path: root/src/main/java/org
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/org')
-rw-r--r--src/main/java/org/spigotmc/builder/Builder.java5
-rw-r--r--src/main/java/org/spigotmc/builder/VersionInfo.java13
2 files changed, 14 insertions, 4 deletions
diff --git a/src/main/java/org/spigotmc/builder/Builder.java b/src/main/java/org/spigotmc/builder/Builder.java
index b361a07..bde98ff 100644
--- a/src/main/java/org/spigotmc/builder/Builder.java
+++ b/src/main/java/org/spigotmc/builder/Builder.java
@@ -35,6 +35,7 @@ import java.security.KeyManagementException;
import java.security.NoSuchAlgorithmException;
import java.security.SecureRandom;
import java.security.cert.X509Certificate;
+import java.text.MessageFormat;
import java.util.Arrays;
import java.util.Date;
import java.util.Enumeration;
@@ -240,7 +241,7 @@ public class Builder
if ( buildNumber != -1 && buildInfo.getToolsVersion() != -1 && buildNumber < buildInfo.getToolsVersion() )
{
- System.err.println( "**** Your BuildTools is out of date and will not build the requested version. Please grab a new copy from http://www.spigotmc.org/" );
+ System.err.println( "**** Your BuildTools is out of date and will not build the requested version. Please grab a new copy from https://www.spigotmc.org/" );
System.exit( 1 );
}
}
@@ -323,7 +324,7 @@ public class Builder
}
} );
- runProcess( CWD, "java", "-jar", "BuildData/bin/fernflower.jar", "-dgs=1", "-hdc=0", "-rbr=0", "-asc=1", "-udv=0", clazzDir.getPath(), decompileDir.getPath() );
+ runProcess( CWD, MessageFormat.format( versionInfo.getDecompileCommand(), clazzDir.getPath(), decompileDir.getPath() ).split( " ") );
}
System.out.println( "Applying CraftBukkit Patches" );
diff --git a/src/main/java/org/spigotmc/builder/VersionInfo.java b/src/main/java/org/spigotmc/builder/VersionInfo.java
index e3a4f34..935a6d8 100644
--- a/src/main/java/org/spigotmc/builder/VersionInfo.java
+++ b/src/main/java/org/spigotmc/builder/VersionInfo.java
@@ -1,10 +1,8 @@
package org.spigotmc.builder;
-import lombok.AllArgsConstructor;
import lombok.Data;
@Data
-@AllArgsConstructor
public class VersionInfo
{
@@ -14,4 +12,15 @@ public class VersionInfo
private String memberMappings;
private String packageMappings;
private String minecraftHash;
+ private String decompileCommand = "java -jar BuildData/bin/fernflower.jar -dgs=1 -hdc=0 -rbr=0 -asc=1 -udv=0 {0} {1}";
+
+ public VersionInfo(String minecraftVersion, String accessTransforms, String classMappings, String memberMappings, String packageMappings, String minecraftHash)
+ {
+ this.minecraftVersion = minecraftVersion;
+ this.accessTransforms = accessTransforms;
+ this.classMappings = classMappings;
+ this.memberMappings = memberMappings;
+ this.packageMappings = packageMappings;
+ this.minecraftHash = minecraftHash;
+ }
}