You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
}