Mac Blocker

This commit is contained in:
Luca Puderbach 2024-12-10 00:48:43 +01:00
parent 7b82b20736
commit 0acb63adb6

View File

@ -173,9 +173,13 @@ public class MonopolyApp extends SimpleApplication implements MonopolyClient, Ga
final AppSettings settings = new AppSettings(true);
settings.setTitle(lookup("monopoly.name"));
try {
// 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) {
} catch (IOException e) {
LOGGER.log(Level.ERROR, e.getMessage());
}
settings.setResolution(config.getResolutionWidth(), config.getResolutionHeight());