From 0acb63adb6ca179d43c6d71979cce87d8d143dc6 Mon Sep 17 00:00:00 2001 From: Luca Puderbach Date: Tue, 10 Dec 2024 00:48:43 +0100 Subject: [PATCH] Mac Blocker --- .../src/main/java/pp/monopoly/client/MonopolyApp.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Projekte/monopoly/client/src/main/java/pp/monopoly/client/MonopolyApp.java b/Projekte/monopoly/client/src/main/java/pp/monopoly/client/MonopolyApp.java index 8425a0c..960b0ea 100644 --- a/Projekte/monopoly/client/src/main/java/pp/monopoly/client/MonopolyApp.java +++ b/Projekte/monopoly/client/src/main/java/pp/monopoly/client/MonopolyApp.java @@ -173,9 +173,13 @@ public class MonopolyApp extends SimpleApplication implements MonopolyClient, Ga final AppSettings settings = new AppSettings(true); settings.setTitle(lookup("monopoly.name")); try { - settings.setIcons(new Image[]{ImageIO.read(new File("src/main/resources/icons/Uniman.png"))}); - } - catch (IOException e) { + // Prüfen, ob das Betriebssystem ein Mac-System ist + if (!System.getProperty("os.name").toLowerCase().contains("mac")) { + settings.setIcons(new Image[]{ImageIO.read(new File("src/main/resources/icons/Uniman.png"))}); + } else { + LOGGER.log(Level.INFO, "Icon setting skipped on macOS due to system restrictions."); + } + } catch (IOException e) { LOGGER.log(Level.ERROR, e.getMessage()); } settings.setResolution(config.getResolutionWidth(), config.getResolutionHeight());