Custom Resource pack not applying to player

Discussion in 'Plugin Development' started by Kingbluesapphire, Nov 23, 2015.

Thread Status:
Not open for further replies.
  1. For this plugin I've been working on I've decided to give it a custom resource pack

    When a player joins i run
    Code:
    player.setResourcePack("[url]https://www.dropbox.com/s/70rpuabqgjlnqj5/HeroVsVillainPack.zip?dl=1[/url]");
    The link is setup to instantly download but it wont apply ingame.

    The server is running Spigot 1.8.8 which should work with Bukkit coding, all the other features work
     
  2. Offline

    Scimiguy

    Have you turned enable server textures on?
    Have you clicked yes when it asked you the first time?
     
    Sorceresofminecraft likes this.
  3. I have
    "Server Resource packs" set to "True"
    And it doesnt ask me when i join it just downloads it.
     
  4. Offline

    Scimiguy

    Seems more like a clientside problem then
     
    Kingbluesapphire likes this.
  5. Offline

    Mrs. bwfctower

    You either already have downloaded it so it 'remembers' that, or you don't have server resource packs to 'Prompt'.
     
    Kingbluesapphire likes this.
  6. Offline

    Xerox262

    I was trying to test this and it had me so confused, until I realized that the only thing you changed was the blaze rod (Downloaded Pack > Opened archive > Facepalmed at my foolishness). What you have is correct, you just need to add a delay of a tick.
     
    Kingbluesapphire likes this.
  7. @Xerox262
    I used a SyncDelayedTask with a delay of "20*1L" and it asked me this time if i wanted to install it. i clicked yes but it didnt change the blaze rod..
     
  8. Offline

    VinexAx789

  9. @VinexAx789
    Should i be sending the player the entire .zip file or just assets or something. The pack should be fine but its still not applying ingame... It works when i go to ResourcePacks and manually apply it but the server cant set it
     
  10. Offline

    pie_flavor

    @Kingbluesapphire Well, the NMS way to do this returns a code that says what happened. You can use this code to figure out where the problem lies.
     
  11. @pie_flavor
    I don't get what you mean... I get there is some code that will say where the problem is? If so what code
     
  12. Offline

    pie_flavor

    @Kingbluesapphire You could always go the complicated route and send a resource pack send packet, and get the response packet's result code. 0 means that your client failed or your pack isn't formatted right, 1 means that your settings are wrong, 2 means that dropbox isn't a good hosting place for this, and 3 means that the resource pack won't load for some reason.
     
  13. Offline

    Xerox262

    Are you sure it's not activating the resource pack? And a side question, are you using the default texture pack when you join? Or are you using a custom resource pack? When I was testing I was using the default pack.
     
  14. Offline

    pie_flavor

    @Xerox262 it doesn't matter, server texture packs are on priority one so it will always override all other packs. and if he knew he would be doing something about it, that's why I suggested the packet/result method.
     
  15. @pie_flavor
    I haven't worked too much with packets yet. Can you maybe tell me how to send a Resource pack packet
     
  16. Offline

    VinexAx789

    @Kingbluesapphire You should be sending them the entire ZIP file and it should be a direct link as an download.
     
  17. Offline

    pie_flavor

    @Kingbluesapphire I'm not very familiar with the actual process myself, but I've been told that ProtocolLib is how you do it without making a mess.
     
  18. @VinexAx789
    That's what im doing, im sending the entire zip and its a direct download... So why isn't it working
     
  19. Offline

    VinexAx789

    @Kingbluesapphire I've had the same problem with the resource set. I thinks it's bugged or something but it works for some people. I'll look into it more it.
     
  20. Offline

    pie_flavor

  21. @pie_flavor
    I don't really want to have it depend on another library. Is it possible without it?
     
  22. Offline

    pie_flavor

    @Kingbluesapphire It won't. You're just using it as a temporary solution to find out where the problem originates, whether it is the resource pack, the server, Bukkit itself, or your client.
     
  23. Offline

    Zombie_Striker

    @Kingbluesapphire
    Heres what I want you to try. Add the link to the Server file's "resourcepack:" section.

    If does not download correctly or it does not apply the texture to your client, then it is either a problem with your link or your resourcepack. To test for this, see if you can manually apply the resource pack into the resourcepack folder of your client. If the texture changes, it a problem with the link. If it does not work, then it's a problem with the texture pack.
     
  24. Offline

    pie_flavor

  25. @Zombie_Striker
    I put the link in 'resource-pack=' and when i join it it says "Making Request" then "Downloading File -size-" but it didn't apply the texture is still the same...
     
  26. Offline

    pie_flavor

    @Kingbluesapphire Then it is a problem with the pack itself. Test it again in singleplayer, in the same MC version. Make sure the one you select is zipped.
     
    Zombie_Striker likes this.
  27. @pie_flavor
    Hmm, i tried downloading the pack but it seems the link isn't working... Would you have a recommendation on where i should upload it maybe somewhere that will keep the same link.
     
  28. Offline

    Xerox262

    It's not a problem with the pack, I created the plugin that you're trying to create with your resource pack and it worked without issue.
     
  29. Offline

    pie_flavor

    @Kingbluesapphire Then it may well be a problem with your internet. I can download it just fine too.
     
  30. @Xerox262
    You used .setResourcePack() and the same exact code or did you change it?
     
Thread Status:
Not open for further replies.

Share This Page