From c7fb1061a3c77210384e83ce707ad931c7a74d6c Mon Sep 17 00:00:00 2001 From: sirjonasxx <36828922+sirjonasxx@users.noreply.github.com> Date: Thu, 11 Feb 2021 23:23:58 +0100 Subject: [PATCH] recommend admin permissions --- G-Earth/src/main/java/gearth/Main.java | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/G-Earth/src/main/java/gearth/Main.java b/G-Earth/src/main/java/gearth/Main.java index e92b210..6788c75 100644 --- a/G-Earth/src/main/java/gearth/Main.java +++ b/G-Earth/src/main/java/gearth/Main.java @@ -57,17 +57,17 @@ public class Main extends Application { System.exit(0); }); -// new Thread(() -> { -// if (!AdminValidator.isAdmin()) { -// Platform.runLater(() -> { -// Alert alert = new Alert(Alert.AlertType.ERROR, "G-Earth needs admin privileges in order to work properly, please restart G-Earth with admin permissions unless you know what you're doing", ButtonType.OK); -// alert.getDialogPane().setMinHeight(Region.USE_PREF_SIZE); -// alert.setResizable(false); -// alert.show(); -// }); -// -// } -// }).start(); + new Thread(() -> { + if (!AdminValidator.isAdmin()) { + Platform.runLater(() -> { + Alert alert = new Alert(Alert.AlertType.WARNING, "G-Earth needs admin privileges in order to work on Flash, please restart G-Earth with admin permissions unless you're using Unity", ButtonType.OK); + alert.getDialogPane().setMinHeight(Region.USE_PREF_SIZE); + alert.setResizable(false); + alert.show(); + }); + + } + }).start(); new Thread(() -> { try {