Skip to content

Commit

Permalink
add method to recalculate command permissions, add rank command
Browse files Browse the repository at this point in the history
  • Loading branch information
Foxikle committed May 9, 2024
1 parent 7152716 commit c27c30e
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

import net.cytonic.cytosis.Cytosis;
import net.minestom.server.command.CommandManager;
import net.minestom.server.entity.Player;

import java.util.Scanner;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
Expand All @@ -20,7 +22,11 @@ public CommandHandler() {
public void registerCystosisCommands() {
CommandManager cm = Cytosis.getCommandManager();
cm.register(new GamemodeCommand());
cm.register(new OperatorCommand());
cm.register(new RankCommand());
}

public void recalculateCommands(Player player) {
player.sendPacket(Cytosis.getCommandManager().createDeclareCommandsPacket(player));
}

public void setupConsole() {
Expand Down

0 comments on commit c27c30e

Please sign in to comment.