mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-03 05:32:18 -07:00
Brigadier based command API
== AT == public net.minecraft.commands.arguments.blocks.BlockInput tag public net.minecraft.commands.arguments.DimensionArgument ERROR_INVALID_VALUE public net.minecraft.server.ReloadableServerResources registryLookup public net.minecraft.server.ReloadableServerResources Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com> Co-authored-by: Marc Baloup <marc.baloup@laposte.net>
This commit is contained in:
@@ -1,6 +1,18 @@
|
||||
--- a/net/minecraft/commands/arguments/MessageArgument.java
|
||||
+++ b/net/minecraft/commands/arguments/MessageArgument.java
|
||||
@@ -54,17 +54,21 @@
|
||||
@@ -40,6 +40,11 @@
|
||||
|
||||
public static void resolveChatMessage(CommandContext<CommandSourceStack> context, String name, Consumer<PlayerChatMessage> callback) throws CommandSyntaxException {
|
||||
MessageArgument.Message message = context.getArgument(name, MessageArgument.Message.class);
|
||||
+ // Paper start
|
||||
+ resolveChatMessage(message, context, name, callback);
|
||||
+ }
|
||||
+ public static void resolveChatMessage(MessageArgument.Message message, CommandContext<CommandSourceStack> context, String name, Consumer<PlayerChatMessage> callback) throws CommandSyntaxException {
|
||||
+ // Paper end
|
||||
CommandSourceStack commandSourceStack = context.getSource();
|
||||
Component component = message.resolveComponent(commandSourceStack);
|
||||
CommandSigningContext commandSigningContext = commandSourceStack.getSigningContext();
|
||||
@@ -54,17 +59,21 @@
|
||||
private static void resolveSignedMessage(Consumer<PlayerChatMessage> callback, CommandSourceStack source, PlayerChatMessage message) {
|
||||
MinecraftServer minecraftServer = source.getServer();
|
||||
CompletableFuture<FilteredText> completableFuture = filterPlainText(source, message);
|
||||
|
Reference in New Issue
Block a user