fix: lint
This commit is contained in:
@@ -206,17 +206,17 @@ public class LaunchOptions implements Serializable {
|
||||
* 0 - ./minecraft/versions/<version>/natives
|
||||
* 1 - custom natives directory
|
||||
*/
|
||||
public NativesDirectoryType getNativesDirType(){
|
||||
public NativesDirectoryType getNativesDirType() {
|
||||
return nativesDirType;
|
||||
}
|
||||
|
||||
/**
|
||||
* Path to the natives directory, optional
|
||||
*/
|
||||
public String getNativesDir(){
|
||||
public String getNativesDir() {
|
||||
return nativesDir;
|
||||
}
|
||||
|
||||
|
||||
public static class Builder {
|
||||
|
||||
private final LaunchOptions options = new LaunchOptions();
|
||||
@@ -369,11 +369,11 @@ public class LaunchOptions implements Serializable {
|
||||
return options.preLaunchCommand;
|
||||
}
|
||||
|
||||
public NativesDirectoryType getNativesDirType(){
|
||||
public NativesDirectoryType getNativesDirType() {
|
||||
return options.nativesDirType;
|
||||
}
|
||||
|
||||
public String getNativesDir(){
|
||||
public String getNativesDir() {
|
||||
return options.nativesDir;
|
||||
}
|
||||
|
||||
@@ -479,12 +479,12 @@ public class LaunchOptions implements Serializable {
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setNativesDirType(NativesDirectoryType nativesDirType){
|
||||
public Builder setNativesDirType(NativesDirectoryType nativesDirType) {
|
||||
options.nativesDirType = nativesDirType;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setNativesDir(String nativesDir){
|
||||
public Builder setNativesDir(String nativesDir) {
|
||||
options.nativesDir = nativesDir;
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -303,11 +303,10 @@ public class DefaultLauncher extends Launcher {
|
||||
File nativeFolder = null;
|
||||
if (options.getNativesDirType() == NativesDirectoryType.VERSION_FOLDER) {
|
||||
nativeFolder = repository.getNativeDirectory(version.getId());
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
nativeFolder = new File(options.getNativesDir());
|
||||
}
|
||||
|
||||
|
||||
// To guarantee that when failed to generate launch command line, we will not call pre-launch command
|
||||
List<String> rawCommandLine = generateCommandLine(nativeFolder).asList();
|
||||
|
||||
@@ -317,7 +316,7 @@ public class DefaultLauncher extends Launcher {
|
||||
|
||||
if (options.getNativesDirType() == NativesDirectoryType.VERSION_FOLDER) {
|
||||
decompressNatives(nativeFolder);
|
||||
}
|
||||
}
|
||||
|
||||
File runDirectory = repository.getRunDirectory(version.getId());
|
||||
|
||||
@@ -360,14 +359,13 @@ public class DefaultLauncher extends Launcher {
|
||||
File nativeFolder = null;
|
||||
if (options.getNativesDirType() == NativesDirectoryType.VERSION_FOLDER) {
|
||||
nativeFolder = repository.getNativeDirectory(version.getId());
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
nativeFolder = new File(options.getNativesDir());
|
||||
}
|
||||
|
||||
|
||||
if (options.getNativesDirType() == NativesDirectoryType.VERSION_FOLDER) {
|
||||
decompressNatives(nativeFolder);
|
||||
}
|
||||
}
|
||||
|
||||
if (isWindows && !FileUtils.getExtension(scriptFile).equals("bat"))
|
||||
throw new IllegalArgumentException("The extension of " + scriptFile + " is not 'bat' in Windows");
|
||||
|
||||
Reference in New Issue
Block a user