ResourcePackCheck 1.0.0

Easy API for developers to check players resourcepacks (also for non-devs)

  1. Neol3108
    RPC
    RPC is plugin that "forces" resourcepacks. It is mostly meant to be used by developers but server owners can use it too! By default the forceAllResourcepacks in the config will be set to true. Which will force any resourcepack sent by the server. (Cancellable via the API)

    How do you force textures?
    Well. It's not really forcing.. since that's not really possible with Minecraft. It is kicking a player if the decline a resourcepack sent by the server. In the config you can define a kick message. And you can use "PLAYER" in caps in the message to use the players name.

    Commands and Permissions
    • /rpc - Gives information about the author. (me) - no permission node
    • /rpc reload - Reloads the config file - rpc.admin / OP
    • /rpc config - Prints currently loaded config - rpc.admin / OP
    API
    In order to use RPC as an API you have to add this to your plugin.yml:
    Code (Text):
    depend: [ResourcePackCheck]
    You have to have the plugin in your plugins folder for it to work!
    That's it! You're hooked into the API.

    Maven
    Maven repository:
    Code (Text):
    <repository>
        <id>xsui-repo</id>
        <url>http://mvn.34-4.nl/content/groups/public/</url>
    </repository>
    Maven dependency:
    Code (Text):
    <dependency>
        <groupId>me.XsUI</groupId>
        <artifactId>RPC</artifactId>
        <version>0.0.1-SNAPSHOT</version>
    </dependency>
    Code Examples
    http://git.34-4.nl/projects/XSUI/repos/rpcexample/browse/src/main/
    That's a simple example plugin I wrote.

    To listen for Resource Pack Statuses just add this to your listener:
    Code (Text):
    @EventHandler
    public void onRPC(ResourcePackStatusEvent e) {
        if(e.getStatus() == ResourcePackStatus.DECLINED) // Check if player declined the resource pack.
            e.setCancelled(true); // If in the config forceAllResourcepacks is set to true. This will cancel the kick
    }
    How to send a resource pack:
    Code (Text):
    player.setResourcePack("http://neol.34-4.nl/3d.zip");
    SrT3123 likes this.