mirror of
https://github.com/Minestom/Minestom.git
synced 2025-03-10 13:49:04 +01:00
Fix boolean properties
Signed-off-by: TheMode <themode@outlook.fr>
This commit is contained in:
parent
dc6a520ab5
commit
e9a3144606
@ -316,7 +316,8 @@ public final class PacketUtils {
|
||||
private static boolean getBoolean(String name, boolean defaultValue) {
|
||||
boolean result = defaultValue;
|
||||
try {
|
||||
result = Boolean.parseBoolean(System.getProperty(name));
|
||||
final String value = System.getProperty(name);
|
||||
if (value != null) result = Boolean.parseBoolean(value);
|
||||
} catch (IllegalArgumentException | NullPointerException ignored) {
|
||||
}
|
||||
return result;
|
||||
|
Loading…
Reference in New Issue
Block a user