diff --git a/src/main/java/com/eu/habbo/Emulator.java b/src/main/java/com/eu/habbo/Emulator.java index 97fe313a..f10c5404 100644 --- a/src/main/java/com/eu/habbo/Emulator.java +++ b/src/main/java/com/eu/habbo/Emulator.java @@ -32,8 +32,8 @@ import java.util.regex.Pattern; public final class Emulator { private static final Logger LOGGER = LoggerFactory.getLogger(Emulator.class); - private static final String OS_NAME = System.getProperty("os.name"); - private static final String CLASS_PATH = System.getProperty("java.class.path"); + private static final String OS_NAME = (System.getProperty("os.name") != null ? System.getProperty("os.name") : "Unknown"); + private static final String CLASS_PATH = (System.getProperty("java.class.path") != null ? System.getProperty("java.class.path") : "Unknown"); public final static int MAJOR = 3; public final static int MINOR = 0; diff --git a/src/main/java/com/eu/habbo/habbohotel/wired/highscores/WiredHighscoreManager.java b/src/main/java/com/eu/habbo/habbohotel/wired/highscores/WiredHighscoreManager.java index 31431699..e7cf9cef 100644 --- a/src/main/java/com/eu/habbo/habbohotel/wired/highscores/WiredHighscoreManager.java +++ b/src/main/java/com/eu/habbo/habbohotel/wired/highscores/WiredHighscoreManager.java @@ -22,8 +22,11 @@ public class WiredHighscoreManager { private static final Logger LOGGER = LoggerFactory.getLogger(WiredHighscoreManager.class); private final HashMap> data = new HashMap<>(); + + private final static String locale = (System.getProperty("user.language") != null ? System.getProperty("user.language") : "en"); + private final static String country = (System.getProperty("user.country") != null ? System.getProperty("user.country") : "US"); - private final static DayOfWeek firstDayOfWeek = WeekFields.of(new Locale(System.getProperty("user.language"), System.getProperty("user.country"))).getFirstDayOfWeek(); + private final static DayOfWeek firstDayOfWeek = WeekFields.of(new Locale(locale, country)).getFirstDayOfWeek(); private final static DayOfWeek lastDayOfWeek = DayOfWeek.of(((firstDayOfWeek.getValue() + 5) % DayOfWeek.values().length) + 1); private final static ZoneId zoneId = ZoneId.systemDefault();