➤ Developer API - ssomar1607/ExecutableItems GitHub Wiki

To use the API, you need download the SCore jar here (LINK).

OR

https://jitpack.io/#Ssomar-Developement/SCore

API Documentation

You can check if the server has ExecutableItems installed by using

boolean hasEI = Bukkit.getPluginManager().getPlugin("ExecutableItems") != null;

The API can be accessed using the class com.ssomar.score.api.ExecutableItemsAPI

You can use this following methods:

=========={VERIF IF ID EXIST}==========

boolean isValidID(String id) {}
true: if an ExecutableItem with ID id is loaded on the server.
false: // not loaded on the server

=========={GET EXECUTABLEITEM}==========

ItemStack getExecutableItem(String id) {}
ItemStack: get the itemStack associate to the ExecutableItem with the ID id
null: if no ExecutableItem found for the ID id

ItemStack getExecutableItem(String id, int amount) {}
ItemStack: get the itemStack associate to the ExecutableItem with the ID id and specific amount
null: if no ExecutableItem found for the ID id

ItemStack getExecutableItem(String id, int amount, Player creator) {}
ItemStack: get the itemStack associate to the ExecutableItem with the ID id, specific amount and with the creator of the ExecutableItem
null: if no ExecutableItem found for the ID id

ItemStack getExecutableItemWithUsage(String id, int usage) {}
ItemStack: get the itemStack associate to the ExecutableItem with the ID id and specific usage
null: if no ExecutableItem found for the ID id

ItemStack getExecutableItemWithUsage(String id, int amount, int usage) {}
ItemStack: get the itemStack associate to the ExecutableItem with the ID id, specific amount and specific usage
null: if no ExecutableItem found for the ID id

ItemStack getExecutableItemWithUsage(String id, int amount, int usage) {}
ItemStack: get the itemStack associate to the ExecutableItem with the ID id, specific amount, specific usage and with the creator of the ExecutableItem
null: if no ExecutableItem found for the ID id

=========={VERIF IF ITS AN EXECUTABLEITEM}==========

boolean isExecutableItem(ItemStack itemStack) {}
true: if the itemStack is an ExecutableItem
false: if the itemStack isn't an ExecutableItem

=========={GET EXECUTABLEITEM OBJECT}==========

Item getExecutableItemConfig(ItemStack itemStack) {}
Item: it's the config of an ExecutableItem