Move commands

This commit is contained in:
themode 2022-01-08 00:56:49 +01:00 committed by TheMode
parent c46d7bf506
commit 3eb0bc28c0
3 changed files with 3 additions and 6 deletions

View File

@ -50,6 +50,8 @@ public class Main {
commandManager.register(new GiveCommand());
commandManager.register(new SetBlockCommand());
commandManager.register(new AutoViewCommand());
commandManager.register(new SaveCommand());
commandManager.register(new GamemodeCommand());
commandManager.setUnknownCommandCallback((sender, command) -> sender.sendMessage(Component.text("Unknown command", NamedTextColor.RED)));

View File

@ -1,7 +1,5 @@
package net.minestom.demo;
import demo.commands.GamemodeCommand;
import net.minestom.demo.commands.SaveCommand;
import net.minestom.server.MinecraftServer;
import net.minestom.server.coordinate.Pos;
import net.minestom.server.entity.Player;
@ -35,9 +33,6 @@ public class MainDemo {
player.setRespawnPoint(new Pos(0, 42, 0));
});
MinecraftServer.getCommandManager().register(new SaveCommand());
MinecraftServer.getCommandManager().register(new GamemodeCommand());
// Start the server on port 25565
minecraftServer.start("0.0.0.0", 25565);
}

View File

@ -1,4 +1,4 @@
package demo.commands;
package net.minestom.demo.commands;
import net.kyori.adventure.audience.MessageType;
import net.kyori.adventure.text.Component;