[API] ResourcePackApi [1.7 | 1.8 | 1.9 | 1.10]
2.2.1API to know about the acceptance of Resourcepacks
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.
I enjoy making all of my plugins for free, but I need your help to keep them for free.
Example:
@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)
}
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)
Links
SlZOd2EkUm9kI1J3YW1GeUooVWtXa2QzZFdGPk4rSmFWelV3WVZoYWJHUiNSbk5hVnpVdytHMDVlVnAzUCswa0okUk1NMEp6WkZka2NHSnBPRDBrSiRSalIzZypXakpzZFZ7VyRtKmpNamsqWTIxT2JGViNSbXBoTUVaUlUxTmFNbHBZJG5waFZ6bDFVRk5XTWxwWSRucGhWemwxJGxFOVAkUiNaPlFs
Please leave a rating if you like this resource.
Donations to support me or this resource are also very much appreciated.
Similar projects
Plugin →Let Me Despawn
Improves performance by tweaking mob despawn rules. Say bye to pesky unintentional persistent mobs.
25MSueta
JourneyMap
Real-time map used for mapping in-game or your browser as you explore.
14.7MSueta
Emotecraft
Create your own emotes in Minecraft.
7.5MSueta
Simple Tpa
A simple tpa plugin which sends requests
5.4MSueta
Common Network
Forge and Fabric Unified Networking Solution
3.9MSueta
Set Home
A lightweight plugin for players to set their homes.
3.8MSueta