p.setTexturePack(String) - not working?

Discussion in 'Spigot Plugin Development' started by Markoz, May 30, 2015.

Thread Status:
Not open for further replies.
  1. Hello guys , i am trying to use this meathod
    p.setTexturePack(url);
    but it wont work with me , so i need help with it :)
    Code (Text):
        @EventHandler
        public void PlayerJoin(PlayerJoinEvent e){
                e.getPlayer().setTexturePack("https://dl.dropbox.com/s/2kld94foz76xzaj/MassiveSoupPvP.zip?dl=0");
                e.getPlayer().sendMessage(ChatColor.YELLOW + "Loading Server TexturePack..");
        }
    [​IMG]
     
  2. JamesJ

    Supporter

    Set the url to end with
    dl=1
     
  3. same
     
  4. JamesJ

    Supporter

    In the gif, what is actually happening?
     
  5. when i join the server it display the texturepack download screen then after a moment it despair
     
  6. md_5

    Administrator Developer

    I'd blame dropbox. Have you tried hosting it on your own webserver?
     
  7. no because i don't have a webserver xD , i have seen many people use dropbox direct link and it works with them
     
  8. so what you Suggest to do?
     
  9. Code (Text):
    @EventHandler
        public void PlayerJoin(final PlayerJoinEvent e){
              e.getPlayer().sendMessage(ChatColor.YELLOW + "Loading Server TexturePack..");
       
              //  e.getPlayer().setTexturePack("https://dl.dropbox.com/s/2kld94foz76xzaj/MassiveSoupPvP.zip?dl=0");
            Bukkit.getServer().getScheduler().scheduleSyncDelayedTask(this, new Runnable() {
                public void run() {
                   
                    e.getPlayer().setTexturePack("https://dl.dropbox.com/s/2kld94foz76xzaj/MassiveSoupPvP.zip?dl=0");
            }
    }, 20L);
             

    }
             
        }

     
    This code will send the texture pack directly
    and does not show the menu screen :)
     
  10. Using firefox I right clicked on the download and pressed "Copy Download Link". I already knew that dl.dropbox.com never serves direct downloads, though.
     
  11. oh thanks for this advice
     
Thread Status:
Not open for further replies.