[API] ResourcePackApi [1.7 | 1.8 | 1.9 | 1.10] 2.2.1

API to know about the acceptance of Resourcepacks

  1. inventivetalent
    Tested Minecraft Versions:
    • 1.7
    • 1.8
    • 1.9
    This API adds a ResourcePackStatusEvent which is called when a Player accepts or declines a resource pack.
    It also includes method the send resource packs with a custom hash.




    Example:
    Code (Text):
    @EventHandler
        public void onResourcePackStatus(ResourcePackStatusEvent e) {
            e.getPlayer();// Player that accepted/declined the resource pack
            e.getStatus();// Status of the resource pack (SUCCESSFULLY_LOADED, DECLINED, FAILED_DOWNLOAD, ACCEPTED)
            e.getHash();// Hash of the resource pack (Can be set with ResourcePackAPI#setResourcepack)
        }
    Code (Text):
    ResourcePackAPI.setResourcepack(Bukkit.getPlayer("inventivetalent"), "http://path/to/resource/pack.zip", "amazing_resource_pack");
    Note: getHash dos not work in 1.10, since it is no longer sent by the client.


    Currently compatible with the following versions
    • 1.7.10 (Protocol hack)
    • 1.8.0 - 1.8.9
    • 1.9
    • 1.10 (not fully tested)

    Maven
    [​IMG]



    Links


    Code (spiget-meta (Unknown Language)):
    SlZOd2EkUm9kI1J3YW1GeUooVWtXa2QzZFdGPk4rSmFWelV3WVZoYWJHUiNSbk5hVnpVdytHMDVlVnAzUCswa0okUk1NMEp6WkZka2NHSnBPRDBrSiRSalIzZypXakpzZFZ7VyRtKmpNamsqWTIxT2JGViNSbXBoTUVaUlUxTmFNbHBZJG5waFZ6bDFVRk5XTWxwWSRucGhWemwxJGxFOVAkUiNaPlFs

    Please leave a rating if you like this resource.
    Donations to support me or this resource are also very much appreciated.

Recent Updates

  1. Fix
  2. 1.10 fix
  3. 1.10 support

Recent Reviews

  1. BlazingBrian
    BlazingBrian
    4/5,
    Version: 2.2.1
    This is great plugin but just need to make it support new versions of minecraft like 1.11. When it is 1.11 ill give the next half star.
  2. Sataniel
    Sataniel
    5/5,
    Version: 2.2.1
    Great resource, extremely simple to use but as powerful as it could be. Keep up the great work :) By the way, is there any way to reset the resource pack?
  3. Shortninja
    Shortninja
    5/5,
    Version: 2.2.1
    another amazing resource from inventivetalent! extremely easy to use and maven support is greatly appreciated
  4. LoneDev
    LoneDev
    5/5,
    Version: 2.2.1
    This is perfect :D I use it for my plugin :)
  5. TheAwesomeGem
    TheAwesomeGem
    5/5,
    Version: 2.2.0
    Pretty good for what it does and nice quick update. I recommend this and I am going to be using this for my future servers.
  6. LoneDev
    LoneDev
    5/5,
    Version: 2.1.0
  7. LoneDev
    LoneDev
    5/5,
    Version: 2.0.3
    Really nice api, i use it for my plugin! :) .
  8. FloThePony
    FloThePony
    5/5,
    Version: 1.4
    its bacccccccckkkkkkkkkkkkk
  9. ChocolateChimp
    ChocolateChimp
    4/5,
    Version: 1.2
    Great resource if you're using 1.8.3 and below, however since 1.8.5 this needs a good update as a few fields no longer exist. Also more of a request, could you not use reflection? It's not really needed as evidence by it breaking the next version. Thanks, and keep up the good work! ;-)
  10. JustinK01
    JustinK01
    5/5,
    Version: 1.2
    Thanks, I been looking for something like this to use in my plugins.