26 lines
522 B
Java
26 lines
522 B
Java
package nl.minkema.leendert;
|
|
|
|
import java.io.File;
|
|
|
|
/**
|
|
* @author J0QUE
|
|
* @version 1.0
|
|
*/
|
|
public class ModLoader {
|
|
|
|
/**
|
|
* Dit was een leuk idee, maar het werkte 9/10 keer niet goed
|
|
*
|
|
* @param file de naam van het bestand
|
|
* @return het pad, danwel in het .jar bestand of als absoluut bestand
|
|
*/
|
|
public static String getFile(String file) {
|
|
File f = new File("mods" + file);
|
|
if (f.exists()) {
|
|
return f.getAbsolutePath();
|
|
}
|
|
return file;
|
|
}
|
|
|
|
}
|