mirror of
https://github.com/JonasunderscoreJones/ConsoleMC.git
synced 2025-10-23 10:39:18 +02:00
bumped version number and small fix
This commit is contained in:
parent
708c76af44
commit
a2d8b4c471
2 changed files with 10 additions and 8 deletions
|
@ -10,6 +10,8 @@ import net.minecraft.server.command.CommandManager;
|
|||
import net.minecraft.server.command.ServerCommandSource;
|
||||
import net.minecraft.text.Text;
|
||||
|
||||
import java.util.function.Supplier;
|
||||
|
||||
public class RunCommand {
|
||||
public static void register(CommandDispatcher<ServerCommandSource> serverCommandSourceCommandDispatcher, CommandRegistryAccess commandRegistryAccess, CommandManager.RegistrationEnvironment registrationEnvironment) {
|
||||
serverCommandSourceCommandDispatcher.register((CommandManager.literal("cmd").requires(source -> source.hasPermissionLevel(4))
|
||||
|
@ -18,7 +20,7 @@ public class RunCommand {
|
|||
);
|
||||
}
|
||||
public static void broadcastToOP(String message, CommandContext<ServerCommandSource> context) {
|
||||
context.getSource().sendFeedback(Text.of(message), true);
|
||||
context.getSource().sendFeedback(() -> Text.of(message), true);
|
||||
}
|
||||
|
||||
public static int run(String command, CommandContext<ServerCommandSource> context) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue