mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-07 15:42:19 -07:00
fix item flags
This commit is contained in:
@@ -192,13 +192,13 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
})))));
|
||||
+ // Paper start - support component removals with a custom pgive command
|
||||
+ final com.mojang.brigadier.tree.CommandNode<net.minecraft.commands.CommandSourceStack> node = net.minecraft.commands.Commands
|
||||
+ .literal("pgive").requires((commandlistenerwrapper) -> commandlistenerwrapper.hasPermission(2))
|
||||
+ .literal("pgive").requires((css) -> css.hasPermission(2))
|
||||
+ .then(net.minecraft.commands.Commands.argument("targets", EntityArgument.players())
|
||||
+ .then(net.minecraft.commands.Commands.argument("item", new ItemArgument(commandRegistryAccess, true)).executes((commandcontext) -> {
|
||||
+ return GiveCommand.giveItem((CommandSourceStack) commandcontext.getSource(), ItemArgument.getItem(commandcontext, "item"), EntityArgument.getPlayers(commandcontext, "targets"), 1);
|
||||
+ .then(net.minecraft.commands.Commands.argument("item", new ItemArgument(commandRegistryAccess, true)).executes((ctx) -> {
|
||||
+ return GiveCommand.giveItem(ctx.getSource(), ItemArgument.getItem(ctx, "item"), EntityArgument.getPlayers(ctx, "targets"), 1);
|
||||
+ })
|
||||
+ .then(net.minecraft.commands.Commands.argument("count", IntegerArgumentType.integer(1)).executes((commandcontext) -> {
|
||||
+ return GiveCommand.giveItem((CommandSourceStack) commandcontext.getSource(), ItemArgument.getItem(commandcontext, "item"), EntityArgument.getPlayers(commandcontext, "targets"), IntegerArgumentType.getInteger(commandcontext, "count"));
|
||||
+ .then(net.minecraft.commands.Commands.argument("count", IntegerArgumentType.integer(1)).executes((ctx) -> {
|
||||
+ return GiveCommand.giveItem(ctx.getSource(), ItemArgument.getItem(ctx, "item"), EntityArgument.getPlayers(ctx, "targets"), IntegerArgumentType.getInteger(ctx, "count"));
|
||||
+ }))
|
||||
+ )
|
||||
+ ).build();
|
||||
|
Reference in New Issue
Block a user