/** * Tries to open a URL in the Browser * * @param url The URL * @param shiftUrl The URL to open when Shift is held */ public static void openBrowser(String url, String shiftUrl) { try { if (Desktop.isDesktopSupported()) { if (shiftUrl.equals(url) || KeyUtil.isShiftPressed()) { Desktop.getDesktop().browse(new URI(shiftUrl)); } else { Desktop.getDesktop().browse(new URI(url)); } } } catch (Exception e) { ModUtil.LOGGER.error("Something bad happened when trying to open a URL!", e); } }