diff options
Diffstat (limited to '')
| -rw-r--r-- | pom.xml | 4 | ||||
| -rwxr-xr-x | src/main/java/net/sowgro/npehero/levelapi/Level.java | 4 | ||||
| -rw-r--r-- | src/main/java/net/sowgro/npehero/main/ErrorDisplay.java | 6 | 
3 files changed, 9 insertions, 5 deletions
@@ -97,7 +97,7 @@                      <jlinkZipName>NPEHero</jlinkZipName>                      <jlinkImageName>app</jlinkImageName>                      <noManPages>true</noManPages> -                    <stripDebug>true</stripDebug> +<!--                    <stripDebug>true</stripDebug>-->                      <noHeaderFiles>true</noHeaderFiles>                      <options>-Dprism.forceGPU=true</options>                      <compress>0</compress> @@ -148,7 +148,7 @@                          </goals>                          <phase>package</phase>                          <configuration> -                            <name>npehero_installer</name> +                            <name>NPEHero</name>                              <linuxShortcut>true</linuxShortcut>                              <linuxMenuGroup>Game</linuxMenuGroup> diff --git a/src/main/java/net/sowgro/npehero/levelapi/Level.java b/src/main/java/net/sowgro/npehero/levelapi/Level.java index 9b54207..7830c16 100755 --- a/src/main/java/net/sowgro/npehero/levelapi/Level.java +++ b/src/main/java/net/sowgro/npehero/levelapi/Level.java @@ -11,6 +11,7 @@ import javafx.scene.paint.Color;  import java.nio.file.Files;  import java.nio.file.StandardCopyOption; +import java.util.HashMap;  import java.util.Map;  public class Level implements Comparable<Level>{ @@ -131,6 +132,9 @@ public class Level implements Comparable<Level>{          }          @SuppressWarnings("unchecked")          Map<String, Object> data = jsonParser.fromJson(new FileReader(jsonFile), Map.class); +        if (data == null) { +            data = new HashMap<>(); +        }          data.put("title", title);          data.put("artist", artist);          data.put("desc", desc); diff --git a/src/main/java/net/sowgro/npehero/main/ErrorDisplay.java b/src/main/java/net/sowgro/npehero/main/ErrorDisplay.java index cd43937..32f7a63 100644 --- a/src/main/java/net/sowgro/npehero/main/ErrorDisplay.java +++ b/src/main/java/net/sowgro/npehero/main/ErrorDisplay.java @@ -86,14 +86,14 @@ public class ErrorDisplay extends Page {              stackTrace.setManaged(true);          }); -        HBox buttonBox = new HBox(exit, showStack); +        HBox buttonBox = new HBox(exit, showStack, printStack);          buttonBox.setSpacing(10); -        VBox main = new VBox(title, exView); +        VBox main = new VBox(title, exView, stackTrace);          main.getStyleClass().add("box");          VBox centerBox = new VBox(); -        centerBox.getChildren().addAll(main, buttonBox, stackTrace); +        centerBox.getChildren().addAll(main, buttonBox);          centerBox.setSpacing(10);          centerBox.setAlignment(Pos.CENTER);  | 
