Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Dev Module #4087

Open
wants to merge 19 commits into
base: 1.21.1
Choose a base branch
from
Prev Previous commit
Next Next commit
update getProperty
  • Loading branch information
IThundxr committed Sep 14, 2024
commit ae86e8227593df98db9ba5f10219806f30f679c5
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,9 @@ public class FabricDevProperties {
private static final boolean IS_DEVELOPMENT_ENV = FabricLoader.getInstance().isDevelopmentEnvironment();

private static boolean getProperty(String name, boolean defaultValue) {
IThundxr marked this conversation as resolved.
Show resolved Hide resolved
try {
return "true".equalsIgnoreCase(System.getProperty("fabric.dev" + name));
} catch (Throwable e) {
String propertyValue = System.getProperty("fabric.dev" + name);
IThundxr marked this conversation as resolved.
Show resolved Hide resolved
if (propertyValue.isEmpty())
return IS_DEVELOPMENT_ENV && defaultValue;
}
return "true".equalsIgnoreCase(propertyValue);
}
}