Skip to content

Commit dc31ff6

Browse files
committed
✨ Implemented lifecycle onRegister to command.
1 parent 6b9bceb commit dc31ff6

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

API/src/main/java/xyz/bitsquidd/bits/lib/command/BitsCommand.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,7 @@ public abstract class BitsCommand {
1616

1717
protected void onRegister() {
1818
// Default implementation does nothing
19-
}
20-
21-
protected void onUnregister() {
22-
// Default implementation does nothing
19+
// Use this method to set up necessary states or permissions for roles dynamically.
2320
}
2421

2522
@Command("usage")

API/src/main/java/xyz/bitsquidd/bits/lib/command/BitsCommandManager.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ private void enableAllCommands() {
124124
.forEach(node -> {
125125
commands.registrar().register(node);
126126
});
127+
bitsCommand.onRegister();
127128
});
128129
}
129130
);

0 commit comments

Comments
 (0)