Skip to content

Commit

Permalink
Using Boolean#getBoolean instead of System#getProperty
Browse files Browse the repository at this point in the history
  • Loading branch information
Despical committed Oct 31, 2024
1 parent d865f22 commit 9fc4599
Showing 1 changed file with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,7 @@ public CommandFramework(@NotNull Plugin plugin) {
}

private void checkRelocation() {
String suppressRelocation = System.getProperty("commandframework.suppressrelocation");

if ("true".equals(suppressRelocation)) return;
if (Boolean.getBoolean("commandframework.suppressrelocation")) return;

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

private void checkIsAlreadyInitialized() {
String suppressRelocation = System.getProperty("commandframework.suppress_initialization");

if (!"true".equals(suppressRelocation) && instance != null) {
if (!Boolean.getBoolean("commandframework.suppress_initialization") && instance != null) {
throw new IllegalStateException("Instance already initialized!");
} else instance = this;
}
Expand Down

0 comments on commit 9fc4599

Please sign in to comment.