Setting Resource Pack

Discussion in 'Plugin Development' started by MnMaxon, Oct 5, 2014.

Thread Status:
Not open for further replies.
  1. Offline

    MnMaxon

    I want to set a player's resource pack when the change worlds, but I can't figure out how to get this to work. This is what I am using:
    Code:java
    1. @EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
    2. public void onPlayerChangedWorldEvent(PlayerChangedWorldEvent e) {
    3. e.getPlayer().setResourcePack("[url]http://download733.mediafire.com/b3gowwkjvkbg/ix27bsfb4bv4tms/Unsimple[/url] 1.4.zip");
    4. }

    When I change worlds, it gives me the prompt and tells me it is downloading it, but my texture pack stays the same. Any help would be appreciated. Thanks for reading.

    PS: Before and after my link in the code, the bukkit forum is adding [ url] and [ /url]. This was not in my code.
     
  2. Offline

    Jimfutsu

    Check in your actual Minecraft settings for your server, does server resource pack say enabled, disable or prompt?
     
  3. Offline

    SeniorCluckers

    MnMaxon
    Remember you can't force someone to you texture pack so your gonna have to make it so if they don't download texture pack to kick them or take them out that world..
     
  4. Offline

    MnMaxon

    Jimfutsu
    It's enabled

    SeniorCluckers
    I'm not trying to force them to use a texture pack, just suggest that they use it. Also, I'm pretty sure that you can't check if someone clicked yes or no.
     
  5. Offline

    SeniorCluckers

  6. Offline

    MnMaxon

    Are you sure? Do you know how to do that?
     
  7. Offline

    MnMaxon

  8. Offline

    MnMaxon

    Bump
    Is this possible? I feel like it shouldn't be very complicated. I tried using DynamicTextures (a plugin that changes texture packs), but I couldn't get that to work. I might have just been using it wrong, though.
     
  9. Offline

    RingOfStorms

    Have you tried adding a slight delay from the world change, and also asking a friend to test and make sure it isn't just your client's settings.
     
  10. MnMaxon Well, there's a packet for if the player accepts the resource pack or not.
     
  11. Offline

    MnMaxon

    RingOfStorms
    I tried from my brother's computer and it didn't work. I'll try from my friend's computer tomorrow. I'll try the delay thing too.

    AdamQpzm
    Are you sure? Do you know what packet? I couldn't find it.
     
  12. Offline

    fireblast709

    MnMaxon and AdamQpzm like this.
  13. Offline

    SeniorCluckers

    fireblast709
    How would you check? And isn't this a 1.8 not 1.7 so we would have to wait for a new version of bukkit?
     
  14. Offline

    Hawktasard

    If you're going to wait for that, You'll have to wait for quite some time.
    I don't think bukkit's coming back for a long long time (if even at all)
     
  15. Offline

    Funergy

    SeniorCluckers You don't have to wait for a new version of bukkit. you can use a protocol hack, but thats not really recommended
     
  16. Offline

    SeniorCluckers

    Like what protocol cause I'm interested?
     
  17. Offline

    SmooshCakez

    Protocol hack = allowing 1.8 clients to join 1.7 servers, meaning that you can send 1.8 packets to those clients.

    *cough* spigot
     
    Tomass and ledship like this.
  18. Offline

    SeniorCluckers

    SmooshCakez
    I have spigot now how to check if that player is use the texture pack?
     
  19. Offline

    SeniorCluckers

Thread Status:
Not open for further replies.

Share This Page