Add an option to disable common path

This commit is contained in:
huangyuhui
2017-02-16 20:34:31 +08:00
parent f836afa2ea
commit 413854d1f1
22 changed files with 124 additions and 123 deletions

View File

@@ -1,52 +0,0 @@
/*
* Hello Minecraft! Launcher.
* Copyright (C) 2013 huangyuhui <huanghongxun2008@126.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see {http://www.gnu.org/licenses/}.
*/
package org.jackhuang.hmcl.api.event.version;
import java.io.File;
import java.util.EventObject;
import org.jackhuang.hmcl.api.Wrapper;
/**
* This event gets fired when we getting minecraft library path.
* <br>
* This event is fired on the {@link org.jackhuang.hmcl.api.HMCLApi#EVENT_BUS}
* @param source {@link org.jackhuang.hmcl.core.version.MinecraftLibrary}
* @param {@code Wrapper<File>} modify this thing to change to your wanted mc lib.
* @author huangyuhui
*/
public class MinecraftLibraryPathEvent extends EventObject {
String location;
Wrapper<File> file;
public MinecraftLibraryPathEvent(Object source, String location, Wrapper<File> value) {
super(source);
this.location = location;
this.file = value;
}
public String getLocation() {
return location;
}
public Wrapper<File> getFile() {
return file;
}
}

View File

@@ -29,6 +29,11 @@ public interface IMinecraftLibrary extends Cloneable {
Extract getDecompressExtractRules();
/**
* Only used for IMinecraftProvider
* @param gameDir
* @return
*/
File getFilePath(File gameDir);
String getName();