Skip to content

Commit 9fc4599

Browse files
committed
Using Boolean#getBoolean instead of System#getProperty
1 parent d865f22 commit 9fc4599

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/main/java/me/despical/commandframework/CommandFramework.java

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,7 @@ public CommandFramework(@NotNull Plugin plugin) {
6969
}
7070

7171
private void checkRelocation() {
72-
String suppressRelocation = System.getProperty("commandframework.suppressrelocation");
73-
74-
if ("true".equals(suppressRelocation)) return;
72+
if (Boolean.getBoolean("commandframework.suppressrelocation")) return;
7573

7674
String defaultPackage = new String(new byte[] {'m', 'e', '.', 'd', 'e', 's', 'p', 'i', 'c', 'a', 'l', '.',
7775
'c', 'o', 'm', 'm', 'a', 'n', 'd', 'f', 'r', 'a', 'm', 'e', 'w', 'o', 'r', 'k'});
@@ -85,9 +83,7 @@ private void checkRelocation() {
8583
}
8684

8785
private void checkIsAlreadyInitialized() {
88-
String suppressRelocation = System.getProperty("commandframework.suppress_initialization");
89-
90-
if (!"true".equals(suppressRelocation) && instance != null) {
86+
if (!Boolean.getBoolean("commandframework.suppress_initialization") && instance != null) {
9187
throw new IllegalStateException("Instance already initialized!");
9288
} else instance = this;
9389
}

0 commit comments

Comments
 (0)