Setting Texture Packs on join?

Discussion in 'Plugin Development' started by Phasesaber, Apr 18, 2014.

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

    Phasesaber

    Heyo!
    I was wondering how you would set the player's texture pack when they joined the server, like on the PlayMindcrack server.
    I know there is a .setResourcePack(""); , but I do not know how to use it.
    Any help would be appreciated.

    Thanks!
    -Phase
     
  2. Offline

    Heirteir

    Phasesaber
    This is done in the server.properties folder
     
  3. Offline

    Phasesaber

    That asks if you want to download it. I want it so it is automatic.
     
  4. Offline

    NonameSL

    @EventHandler
    public void onPlayerJoin(PlayerJoinEvent e){
    e.getPlayer().setResourcePack(new URL(...));
    }
     
  5. Offline

    RawCode

    you not allowed to force client to use texture pack.
     
  6. Offline

    Phasesaber

    Read the OP.

    It takes a String, not a URL.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 7, 2016
  7. Phasesaber Then just put the URL as a String, not a URL. And RawCode is right - it will only ask the player if they want it, it's literally impossible to force them to.
     
  8. Offline

    NonameSL

    Woops, my bad. I meant e.getPlayer().setTexturePack("url");
    Anyways that is very simple.
     
  9. Offline

    Phasesaber

    Join the PlayMindcrack server. Look around. See that I'm right. ...... Profit.

    That seems to do nothing. :p

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 7, 2016
  10. Offline

    RawCode

    I want it so it is automatic.
    vs
    Read the OP.
    Phasesaber

    looks like you are too smart for this forum, good luck to you
     
  11. Phasesaber Really? Do we have to go down this road? Okay. Joined PlayMinedcrack. Was greeted by this screen:

    Show Spoiler
    [​IMG]


    That didn't sound to fun so I clicked no. I looked around. Saw that you were wrong. Didn't really get much profit out of it.

    The whole "automatic" thing? It's not possible without a mod, okay? RawCode said it wasn't, I said it wasn't, and the Bukkit JavaDocs say it isn't.
     
Thread Status:
Not open for further replies.

Share This Page