Server Resource pack help

Discussion in 'Spigot Plugin Development' started by masterkni666, May 11, 2016.

  1. I have a server that constantly updates a resource pack and using the bukkit sendResourcePack wasn't sending new iterations of the resource pack. (This must be done while server is still up.)
    So I had to send a packet to them every time they logged in. This is my problem.

    Is there a way to check if the player already has the latest resource pack so I don't have to send them the same resource pack every time? ProtocolLib use is welcome.
  2. If you use this method to set the player's resource pack it automatically checks if it is the same and only downloads it if it need to.
  3. I have tried using that method and it doesn't seem to update the resourcepack unless the sha1 of the server resource pack is different. (A guess)
    The thing is I am not using a sha1 at all.
  4. Honestly I'm not too experienced with using resource packs, I just remembered seeing that method and thought it would help.
    @Elsweyr Has a bit more experience and he might be able to help you.
  5. You could try adding garbage the the URL. From my understanding this works

    Just create something randomly different each time, or even use the epoch timestamp
  6. @worthless_hobo @masterkni666 I have actually been wondering this as well. I know it is possible because I have seen servers kick or teleport players for not using the server resource pack, but I'm not sure what they check to determine that. Perhaps you could put a unique file in the pack and check for that file somehow?
  7. The client sends a response packet back to the server.
  8. This method would have been ok, however it creates a unique resource pack everytime time.
    The player's folder would fill up with outdated ones very quickly.