类 ContentProviders
java.lang.Object
io.github.lijinhong11.mittellib.hook.ContentProviders
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static voiddestroyBlock(@NotNull Location loc) Remove the block whatever which plugin owns itstatic @NotNull List<PackedBlock> Get all usable blocks (which bind an item)static @Nullable PackedBlockGet a block through content provider by its idstatic @Nullable PackedBlockGet the block by its locationGet all block suggestions for tab completestatic @Nullable ContentProviderGet a content provider by its idstatic @Nullable StringgetIdFromItem(@NotNull ItemStack item) Get item's idstatic @Nullable ItemStackgetItemStack(@NotNull String fullNamespaceKey) Get an item stack through content provider by its idGet all item suggestions (including blocks) for tab completestatic voidinit()
-
构造器详细资料
-
ContentProviders
public ContentProviders()
-
-
方法详细资料
-
init
public static void init() -
getById
Get a content provider by its id- 参数:
id- the content provider's id- 返回:
- the content provider, null if not found
-
getItemStack
Get an item stack through content provider by its id- 参数:
fullNamespaceKey- the item id expression (e.g.nexo:example_block)- 返回:
- the item stack, null if not found
-
getIdFromItem
Get item's id- 参数:
item- the item- 返回:
- the item's id in content provider, null if not found
-
getBlock
Get a block through content provider by its id- 参数:
fullNamespaceKey- the block id expression (e.g.nexo:example_block)- 返回:
- the block, null if not found
-
destroyBlock
Remove the block whatever which plugin owns it -
getItemSuggestions
Get all item suggestions (including blocks) for tab complete- 返回:
- a list of item suggestion
-
getBlockSuggestions
Get all block suggestions for tab complete- 返回:
- a list of block suggestion
-
getAllUsableBlocks
Get all usable blocks (which bind an item)- 返回:
- a list of all usable blocks
-
getBlockByLocation
Get the block by its location- 返回:
- the block
-