create StartMenu

This commit is contained in:
Lukas 2020-06-15 17:43:08 +02:00
parent d0ca08738b
commit 2aaeae29b6
5 changed files with 52 additions and 3 deletions

1
.idea/compiler.xml generated
View File

@ -6,6 +6,7 @@
<sourceOutputDir name="target/generated-sources/annotations" />
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
<outputRelativeToContentRoot value="true" />
<module name="minosoft" />
<module name="Minosoft" />
</profile>
</annotationProcessing>

13
pom.xml
View File

@ -36,6 +36,14 @@
<target>11</target>
</configuration>
</plugin>
<plugin>
<groupId>org.openjfx</groupId>
<artifactId>javafx-maven-plugin</artifactId>
<version>0.0.4</version>
<configuration>
<mainClass>HelloFX</mainClass>
</configuration>
</plugin>
</plugins>
</build>
@ -46,6 +54,11 @@
</properties>
<dependencies>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-controls</artifactId>
<version>14</version>
</dependency>
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>

View File

@ -51,7 +51,6 @@ public class Minosoft {
checkClientToken();
Connection c = new Connection(config.getString("debug.host"), config.getInteger("debug.port"));
accountList = config.getMojangAccounts();
if (accountList.size() == 0) {
/*
@ -66,8 +65,10 @@ public class Minosoft {
System.exit(1);
}
account.saveToConfig();
c.setPlayer(new Player(account));
c.connect();
Connection connection = new Connection(config.getString("debug.host"), config.getInteger("debug.port"));
connection.setPlayer(new Player(account));
connection.connect();
}
/**

View File

@ -0,0 +1,34 @@
/*
* Codename Minosoft
* Copyright (C) 2020 Moritz Zwerger
*
* 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 <https://www.gnu.org/licenses/>.
*
* This software is not affiliated with Mojang AB, the original developer of Minecraft.
*/
package de.bixilon.minosoft.render;
import javafx.application.Application;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.stage.Stage;
public class StartMenu extends Application {
public static void main(String[] args) {
launch(args);
}
@Override
public void start(Stage primaryStage) {
Parent root = FXMLLoader.load(getClass().getResource("StartMenu.fxml"));
primaryStage.setTitle("FXML");
primaryStage.setScene(new Scene(root, 100, 57));
primaryStage.show();
}
}

View File