Skip to content

Commit 03e39d2

Browse files
authored
Merge pull request #72 from cylian914/patch-1
Fix crashing when MCMT_ENABLE_DEBUG is undefined
2 parents 3b754fe + 7aeacd6 commit 03e39d2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/net/himeki/mcmtfabric/MCMT.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ public void onInitialize() {
9191
LOGGER.info("Initializing MCMTFabric...");
9292

9393
// Register debug blocks and entities based on environment variable
94-
if (System.getProperty("MCMT_ENABLE_DEBUG").equals("true")) {
94+
if (Objects.requireNonNullElse(System.getProperty("MCMT_ENABLE_DEBUG"), "").equals("true")) {
9595
registerDebugBlocks();
9696
registerDebugEntities();
9797
} else {
@@ -130,4 +130,4 @@ public void onInitialize() {
130130

131131
LOGGER.info("MCMT Initialized");
132132
}
133-
}
133+
}

0 commit comments

Comments
 (0)