How to make an auto-upload Resource Pack to player?

The resource pack download offer window closes itself after a second. Why?

i have plugin https://www.spigotmc.org/resources/combat-weaponry-plus-1-16-x.84248/
need make auto-upload Resource Pack