API - Palgia/SkItemCreator-V2 GitHub Wiki
SkItemCreatorV2 features a complete API to use in your Skripts!
All functions can be found in functions.sk inside SkItemCreatorV2's folder.
SKICInternalNameOfItem(i: item)
Returns the SkItemCreator ID of an item.
SKICItemCategoryFromID(id: string)
Returns the item-category of the provided item's ID.
SKICGetItemFromID(id: string)
Returns the item from the given ID.
SKICImportItem(i: item, id: string)
Register an item inside the admin GUI. Set ID to the ID you want to set for your item.
SKICAllItemsOfCategory(category: string)
Returns all items IDs inside the given category.
SKICRemoveImportedItem(id: string)
Removes an imported item.
SKICGetRarity(i: item)
Returns the rarity of the given item.
SKICRandomGenerate(itemid: string)
Returns an item with random generated stats (Needs SkRPG).
SKICGetPermission(i: item)
Get the permission associated with the item.
Checks if an item can be used by the player. If your items has conditions, this function will check if they are met. If your item doesn't have any conditions, this function will always return true.
Returns true (can be used) or false.
SKICCheckConditions(p: player, i: item)
Returns all items inside a kit. Does not trigger sound, messages etc.
SKICReturnKitItems(kit: string)
Give a kit to a player. Set bypass to true to bypass cooldown and permission.
SKICGiveKitToPlayer(p: player, kit: string, bypass: boolean)
Returns true if block is a custom block
SKICIsCustomBlock(block: block)
Returns the ID of the block
SKICGetBlockID(block: block)
Returns true if the given item can break the given custom block.
SKICIsToolWhitelisted(item: item, block: block)
Returns true if the given item can't break the given custom block.
function SKICIsToolBlacklisted(item: item, block: block)
command /getitem <string>:
trigger:
give SKICGetItemFromID(arg 1) to player
on load:
set {_item} to iron ingot of sharpness 2 named "&e&lCustom Ingot"
SKICImportItem({_item}, "custom_ingot")
command /getswords:
trigger:
open chest inventory with 6 rows named "&8&lMy Swords"
set {_l} to 1
loop SKICAllItemsOfCategory("swords"):
set {_item} to SKICGetItemFromID(loop-value)
set slot {_l} of player's current inventory to {_item}
add 1 to {_l}
command /checkconditions:
trigger:
if SKICCheckConditions(player, tool of player) is true:
send "&aYou can use your item!"
else:
send "&cYou can't use your item!