fix: fix disable error

This commit is contained in:
Tsubasa6848
2024-01-05 22:41:52 +08:00
Unverified
parent 87a671899a
commit 8a1316b16a
2 changed files with 2 additions and 4 deletions
+1 -3
View File
@@ -9,7 +9,7 @@ Plugin::Plugin(ll::plugin::NativePlugin& self) : mSelf(self) {
} }
bool Plugin::enable() { bool Plugin::enable() {
//TPS::CaculateTPS(); TPS::CaculateTPS();
RegisterCommands(); RegisterCommands();
item_despawn_time = 300; item_despawn_time = 300;
Cleaner::AutoCleanTask(60); Cleaner::AutoCleanTask(60);
@@ -23,8 +23,6 @@ bool Plugin::enable() {
bool Plugin::disable() { bool Plugin::disable() {
logger.info("Disabling Cleaner..."); logger.info("Disabling Cleaner...");
// Code for disabling the plugin goes here. // Code for disabling the plugin goes here.
//auto_clean_task->cancel();
//check_clean_task->cancel();
UnregisterCommands(); UnregisterCommands();
logger.info("Cleaner Disabled!"); logger.info("Cleaner Disabled!");
return true; return true;
+1 -1
View File
@@ -54,7 +54,7 @@ void RegCleanerCommand(CommandRegistry& registry) {
return output.success("mspt {}", TPS::getMspt()); return output.success("mspt {}", TPS::getMspt());
} else if (act == "clean") { } else if (act == "clean") {
output.success("Clean task started!"); output.success("Clean task started!");
Cleaner::CleanTask(20, 5); Cleaner::CleanTask(20, 5); // Config
return; return;
} else if (act == "reload") { } else if (act == "reload") {
output.success("Reloading Cleaner ..."); output.success("Reloading Cleaner ...");