Skip to content
This repository was archived by the owner on Nov 1, 2024. It is now read-only.
Austin Pilz edited this page Aug 12, 2017 · 4 revisions

The uChests API allows you to use your plugin to send uChests to players directly without having to execute any commands in game.

Soft Depend

It is highly recommend that you place the following soft depend line in your plugin.yml file. This will ensure that if the server your plugin is running on has uChests, your plugin will load after uChests to ensure your plugin can properly use the uChests API.

softdepend: [uChests]

API Hook

Plugin uChests = getServer().getPluginManager().getPlugin("uChests"); //Gets plugin instance from server
if ((uChests != null) && uChests.isEnabled()) //Ensures it has been loaded and enabled successfully
{
    UnusualChest ucPlugin = UnusualChest.instance; //Sets local instance
		
    //ucPlugin.uChestAPI.sendChest(player, locked); //Uses API to send locked uChest to supplied player
}

Clone this wiki locally