CustomCrafterAPI

Types

Link copied to clipboard

Restriction level for recipe name duplication, applied during recipe registration.

Link copied to clipboard

Represents the release stage of the Custom Crafter API.

Properties

Link copied to clipboard
const val API_VERSION: String

Custom Crafter API version string.

Link copied to clipboard

Author names of the Custom Crafter API.

Link copied to clipboard

Default value of AllCandidateUIDesigner

Link copied to clipboard

Default value of base-block.

Link copied to clipboard

Default value of base-block-side

Link copied to clipboard

Default value of craft-ui-designer.

Link copied to clipboard

Default value of recipe-name-strict-level.

Link copied to clipboard

Default value of result-give-cancel feature.

Link copied to clipboard

Default value of use-custom-craft-ui

Default value of use-multiple-result-candidate feature.

Link copied to clipboard
const val MAJOR_VERSION: Int = 5

Major version number of the Custom Crafter API.

Link copied to clipboard
const val MINOR_VERSION: Int = 2

Minor version number of the Custom Crafter API.

Link copied to clipboard
const val PATCH_VERSION: Int = 1

Patch version number of the Custom Crafter API.

Link copied to clipboard

Release stage of the Custom Crafter API.

Functions

Link copied to clipboard

Gets a base block type.

Link copied to clipboard

Gets the base block's side size.

Link copied to clipboard

Returns a current CraftUI designer.

Link copied to clipboard

Returns current recipe-name-strict-level

Link copied to clipboard

Returns an immutable list of all registered recipes.

Link copied to clipboard

Returns registered recipes whose names satisfy the given filter predicate.

Returns registered recipes whose names exactly match the given string.

Link copied to clipboard

Returns recipes that are registered by given plugin instance.

Link copied to clipboard

Returns a set of all registered recipe names.

Link copied to clipboard

Returns a boolean value that means the Custom Crafter API give result items to players or not.

Link copied to clipboard

Returns a boolean value that means 'Custom Craft UI open' enabled or not.

Link copied to clipboard

Returns a boolean value that means 'multiple result candidate' feature enabled or not.

Link copied to clipboard

Checks full-compatibility

Link copied to clipboard
fun registerRecipe(recipes: List<CRecipe>, plugin: JavaPlugin = CustomCrafter.getInstance(), calledAsync: Boolean = false)

Registers the provided recipes and fires RegisterCustomRecipeEvent.

Link copied to clipboard
fun setBaseBlock(type: Material, calledAsync: Boolean = false)

Sets base block with given material.

Link copied to clipboard
fun setBaseBlockSideSize(size: Int, calledAsync: Boolean = false): Boolean

Sets base block's side size.

Link copied to clipboard
fun setCraftUIDesigner(designer: CraftUIDesigner, calledAsync: Boolean = false)

Sets a new CraftUI designer if a specified is valid.

Link copied to clipboard

Sets the recipe name strict level.

Link copied to clipboard

Sets a boolean value that means the Custom Crafter API give result items to players or not.

Link copied to clipboard

Sets 'Custom Craft UI open' enables or not.

Link copied to clipboard

Sets 'multiple result candidate' feature enables or not.

Link copied to clipboard
fun unregisterAllRecipes(calledAsync: Boolean = false)

Unregisters all registered recipes.

Link copied to clipboard
fun unregisterRecipe(name: String? = null, plugin: JavaPlugin? = CustomCrafter.getInstance(), calledAsync: Boolean = false)

Unregisters recipes that match the specified conditions.