Skip to content

Commit 3d6beb3

Browse files
committed
Fixed command uses
1 parent 259a529 commit 3d6beb3

2 files changed

Lines changed: 9 additions & 6 deletions

File tree

src/Library.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
use imperazim\components\plugin\PluginToolkit;
66
use imperazim\components\plugin\traits\PluginToolkitTrait;
77

8+
use imperazim\components\commands\PluginsCommand;
9+
810
/**
911
* Class Library
1012
* TODO: This class should not be called in other plugins!
@@ -23,6 +25,10 @@ protected function onEnable(): void {
2325

2426
$this->componentsManager = new LibraryComponents($this);
2527
$this->componentsManager->enableComponents();
28+
29+
$this->overwriteCommands($this, [
30+
'plugins' => PluginsCommand::class
31+
]);
2632
}
2733

2834
/**

src/LibraryModules.php

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,9 @@
22

33
declare(strict_types = 1);
44

5+
use pocketmine\plugin\PluginBase;
56
use imperazim\command\LibCommandHooker;
67

7-
use imperazim\components\commands\VersionCommand;
8-
use imperazim\components\commands\PluginsCommand;
9-
use imperazim\components\commands\GeneratePluginCommand;
10-
118
/**
129
* Class LibraryModules
1310
* TODO: This class should not be called in other plugins!
@@ -17,8 +14,8 @@ final class LibraryModules {
1714
/**
1815
* Load all modules.
1916
*/
20-
public static function loadModules(Library $plugin): void {
21-
LibCommandHooker::registerInterceptor($this->plugin);
17+
public static function loadModules(PluginBase $plugin): void {
18+
LibCommandHooker::registerInterceptor($plugin);
2219
}
2320

2421
}

0 commit comments

Comments
 (0)