2018-04-11 14:33:45 +02:00
|
|
|
package exopandora.worldhandler;
|
2018-02-05 17:31:55 +01:00
|
|
|
|
|
|
|
|
import java.awt.EventQueue;
|
|
|
|
|
import java.io.File;
|
|
|
|
|
import java.util.Locale;
|
|
|
|
|
|
|
|
|
|
import javax.swing.UIManager;
|
|
|
|
|
|
|
|
|
|
import exopandora.worldhandler.installer.Window;
|
|
|
|
|
|
|
|
|
|
public class Main
|
|
|
|
|
{
|
|
|
|
|
public static final String NAME = "World Handler";
|
|
|
|
|
public static final String MODID = "worldhandler";
|
2020-01-25 14:19:00 +01:00
|
|
|
public static final String MC_VERSION = "1.15.2";
|
|
|
|
|
public static final String MOD_VERSION = "2.8.1";
|
2019-04-02 18:17:54 +02:00
|
|
|
public static final String URL = "https://minecraft.curseforge.com/projects/world-handler-command-gui";
|
2018-02-05 17:31:55 +01:00
|
|
|
|
|
|
|
|
public static void main(String[] args)
|
|
|
|
|
{
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
|
|
|
|
|
}
|
|
|
|
|
catch(Exception e)
|
|
|
|
|
{
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
EventQueue.invokeLater(new Window());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static File getInitialDirectory()
|
|
|
|
|
{
|
|
|
|
|
String home = System.getProperty("user.home", ".");
|
|
|
|
|
String os = System.getProperty("os.name").toLowerCase(Locale.ENGLISH);
|
|
|
|
|
String minecraft = ".minecraft";
|
|
|
|
|
|
2018-02-17 18:57:33 +01:00
|
|
|
if(os.contains("win") && System.getenv("APPDATA") != null)
|
2018-02-05 17:31:55 +01:00
|
|
|
{
|
|
|
|
|
return new File(System.getenv("APPDATA"), minecraft);
|
|
|
|
|
}
|
|
|
|
|
else if(os.contains("mac"))
|
|
|
|
|
{
|
|
|
|
|
return new File(new File(new File(home, "Library"), "Application Support"), "minecraft");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return new File(home, minecraft);
|
|
|
|
|
}
|
|
|
|
|
}
|