mirror of
https://github.com/Minestom/Minestom.git
synced 2025-03-31 00:45:51 +02:00
Move commands
This commit is contained in:
parent
c46d7bf506
commit
3eb0bc28c0
@ -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)));
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
package demo.commands;
|
||||
package net.minestom.demo.commands;
|
||||
|
||||
import net.kyori.adventure.audience.MessageType;
|
||||
import net.kyori.adventure.text.Component;
|
||||
|
Loading…
Reference in New Issue
Block a user