Skip to content

Commit c8c8799

Browse files
Fix reload command will crash plugin (using reload config instead)
1 parent 9e845fd commit c8c8799

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

pom.xml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -423,15 +423,16 @@
423423
<url>https://nexus.iridiumdevelopment.net/repository/maven-releases/</url>
424424
</repository>-->
425425

426-
<!-- Temporary disable for unknown host
426+
<!--
427427
<repository>
428428
<id>Sparky</id>
429429
<url>https://nexus.sparky.ac/repository/Sparky/</url>
430430
</repository>-->
431+
<!-- 502 Bad Gateway
431432
<repository>
432433
<id>songoda</id>
433434
<url>https://repo.songoda.com/repository/public/</url>
434-
</repository>
435+
</repository>-->
435436
<!--MineDown -->
436437
<repository>
437438
<id>minebench-repo</id>

src/main/java/org/maxgamer/quickshop/command/subcommand/SubCommand_Debug.java

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,11 @@
3737
import java.lang.management.ManagementFactory;
3838
import java.lang.management.RuntimeMXBean;
3939
import java.lang.reflect.Method;
40-
import java.util.*;
40+
import java.util.ArrayList;
41+
import java.util.Arrays;
42+
import java.util.Collections;
43+
import java.util.List;
44+
import java.util.Map;
4145
import java.util.logging.Level;
4246

4347
@AllArgsConstructor
@@ -123,15 +127,15 @@ public void switchDebug(@NotNull CommandSender sender) {
123127
plugin.reloadConfiguration();
124128
plugin.getConfig().set("dev-mode", false);
125129
plugin.saveConfiguration();
126-
plugin.reload();
130+
plugin.getReloadManager().reload();
127131
plugin.text().of(sender, "command.now-nolonger-debuging").send();
128132
return;
129133
}
130134

131135
plugin.reloadConfiguration();
132136
plugin.getConfig().set("dev-mode", true);
133137
plugin.saveConfiguration();
134-
plugin.reload();
138+
plugin.getReloadManager().reload();
135139
plugin.text().of(sender, "command.now-debuging").send();
136140
}
137141

0 commit comments

Comments
 (0)