Topic category: Advanced modding
Hi, I know it's ridicilous but I want to show the command to selected player. I reviewed it, in the ".java" file it's write:
public class TradeadminCommand {
    @SubscribeEvent
    public static void registerCommand(RegisterCommandsEvent event) {
        event.getDispatcher().register(Commands.literal("xx").requires(s -> s.hasPermission(3)).then(Commands.argument("name", ItemArgument.item(event.getBuildContext()))));
    }
}
But I want like this:
public class TradeadminCommand { 
    @SubscribeEvent 
    public static void registerCommand(RegisterCommandsEvent event) { 
        event.getDispatcher().register(Commands.literal("xx").requires(s -> s.hasLogicNBT(NBT == true)).then(Commands.argument("name", ItemArgument.item(event.getBuildContext())))); 
    } 
}