mirror of
https://github.com/EarthMC/QuickShop-Reremake.git
synced 2026-11-25 09:59:49 -05:00
Also cancel tasks when we setup boot error
This commit is contained in:
1 parent
931ccfe673
commit
481b28931e
2 files changed
+2
-1
No files matched your search
@@ -1880,6 +1880,7 @@ public class QuickShop extends JavaPlugin {
|
||||
public void setupBootError(BootError bootError) {
|
||||
this.bootError = bootError;
|
||||
HandlerList.unregisterAll(this);
|
||||
Bukkit.getScheduler().cancelTasks(this);
|
||||
}
|
||||
|
||||
public void registerCustomCommands() {
|
||||
|
||||
@@ -365,7 +365,7 @@ public class CommandManager implements TabCompleter, CommandExecutor {
|
||||
@NotNull String commandLabel,
|
||||
@NotNull String[] cmdArg) {
|
||||
if (plugin.getBootError() != null) {
|
||||
if (cmdArg.length != 1 && !"paste".equalsIgnoreCase(cmdArg[0]) && !"reload".equalsIgnoreCase(cmdArg[0])) {
|
||||
if (cmdArg.length != 1 && !"paste".equalsIgnoreCase(cmdArg[0])) {
|
||||
plugin.getBootError().printErrors(sender);
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user