Local Resource Pack Hoster 1.1

Host your server resource packs with ease and security directly from your server!

  1. AeternumNetwork
    Tested Minecraft Versions:
    • 1.7
    • 1.8
    • 1.9
    • 1.10
    • 1.11
    • 1.12
    • 1.13
    Source Code:
    https://github.com/Aeternum-Studios/LocalResourcePackHoster
    Contributors:
    BananaPuncher714
    Local Resource Pack Hoster
    Are you tired of hosting your public resource packs on dropbox? Maybe you want your players to have multiple resource pack options? Or maybe you only want to allow certain people to use a super special custom pack? Well, look no further! This plugin is capable of that, and even more, especially for developers!

    What is this?
    Local Resource Pack Hoster allows your server to self-serve resource pack requests. An additional port is required for the mini http daemon used to handle client requests.

    Cool, so how does this work?
    LocalResourcePackHoster hosts a mini http daemon which listens for client requests. Once it recieves a request, it will check if the ip of the client requesting matches an online player's ip. If so, it will check if the player has permission to access the resource pack requested. If so, it will send it to the player.

    How secure is it?
    The mini http daemon only serves resource packs specified inside the config, and no more than that. Premium resource packs are safe and can only be accessed by people with the right permissions, since the ip of the request and player are checked so that it's not possible to request a resource pack from a computer that is not connected to the server.

    Commands
    /resourcepack <id> [player] - Lets players download resource packs they have access to, and allows server admins or the console to prompt the desired player with a custom resource pack.

    Permissions
    • localresourcepack.user - True by default; lets players change their own resource pack.
    • localresourcepack.admin - OP by default; lets admins set players' resource packs. The desired player must have permission to use the resource pack specified.
    • localresourcepack.pack.<id> - OP by default; lets players download the resource pack.
    The Config
    Requires a restart to update in-game.
    Code (YAML):
    # The port to use for the mini-http daemon
    port
    : 40021
    # Whether or not the console should print a message whenever a player attempts to fetch a resource pack
    verbose
    : false
    # Whether or not the server is localhost; Useful for testing situations if you're not able to open a port
    localhost
    : false
    # The packs are <id>: <path-to-resource-pack>
    # The packs should be placed inside the '/plugins/LocalResourcePackHoster/resourcepacks/' folder
    packs
    :
      demo
    : "demopack.zip"
    For developers
    You can add/remove/view resource packs loaded by getting the LocaleResourcePackHoster instance like so:
    Code (Java):
    LocalResourcePackHoster plugin = LocalResourcePackHoster.getPlugin( LocaleResourcePackHoster.class );
    Map< String, File > resourcepacks = plugin.getResourcePacks();
    Send a resource pack to a player like this:
    Code (Java):
    Player player;
    String resourcePackId;
    plugin.sendResourcePack( player, resourcePackId );
    Note that the resource pack id has to be a valid resource pack and the player must have permission to get it.

    This plugin also provides a ResourcePackWrapper, and a SoundPackWrapper, which allows you to edit resource packs with ease!

    Here is a quick demo on how to create and edit a SoundPackWrapper.
    Code (Java):
    File iconImage, audioFile;
    String description;
    try {
        // First create a new SoundPackWrapper from a file
        SoundPackWrapper wrapper = new SoundPackWrapper( file );
        // Next, we add the pack icon, and replace any existing ones.
        wrapper.addElement( "pack.png", iconImage, StandardCopyOption.REPLACE_EXISTING );
        // Then we can set the description.
        wrapper.setDescription( description );
        // Now we will add a sound to the pack.
        wrapper.addSound( new SoundResource( "sound_id", audioFile, true ), "sound_path", false );
        // Call the save method to save the description, but if you're not changing the description, call the ZipWrapper#close() method once you're done adding/remove files.
        wrapper.save();
        // We can also do wrapper.close();
    } catch ( IOException e ) {
        e.printStackTrace();
    }

Recent Updates

  1. Minor developer update

Recent Reviews

  1. Tarlak333
    Tarlak333
    3/5,
    Version: 1.1
    Lightweight & works with my paper 1.16.4 server, however there are too few config options, such as the ability to force resource pack download upon login.
  2. AlissonDev
    AlissonDev
    4/5,
    Version: 1.1
    Can the developer of this resource add compatibility with maven?
    .
  3. DrOreo002
    DrOreo002
    5/5,
    Version: 1.1
    Good plugin!. Really helpful for RPG server!, no more $$ need to spend on hosting resourcepack download hoster!