Lucky Blocks API
The EdToolsLuckyBlocksAPI provides methods to interact with Lucky Blocks, allowing you to create, identify, and manage them.
Get API Instance
EdToolsLuckyBlocksAPI luckyBlocksAPI = EdToolsAPI.getInstance().getLuckyBlocksAPI();Methods
getLuckyBlockItem(String id, Player owner)
getLuckyBlockItem(String id, Player owner)Creates a new Lucky Block item.
id: The ID of the Lucky Block type as defined in the configuration.owner: The player who will own this Lucky Block.Returns: An
ItemStackrepresenting the Lucky Block.
isLuckyBlock(ItemStack item)
isLuckyBlock(ItemStack item)Checks if a given item is a valid Lucky Block from this plugin.
item: TheItemStackto check.Returns:
trueif the item is a Lucky Block,falseotherwise.
isLuckyBlockUnlocked(ItemStack item)
isLuckyBlockUnlocked(ItemStack item)Checks if a Lucky Block has been "unlocked" (i.e., its rewards can be given).
item: The Lucky BlockItemStack.Returns:
trueif it's unlocked,falseif it's still "sealed".
updateLuckyBlock(Player player, ItemStack item)
updateLuckyBlock(Player player, ItemStack item)Updates the state or lore of a Lucky Block. This is often used after a player has met certain conditions to unlock it.
player: The player who owns the block.item: The Lucky BlockItemStackto update.
Was this helpful?