接口 ContentProvider
- 所有已知实现类:
CraftEngineContentProvider,EcoItemsContentProvider,ExecutableItemsContentProvider,ItemsAdderContentProvider,MinecraftContentProvider,MMOItemsContentProvider,NexoContentProvider,OraxenContentProvider
public interface ContentProvider
-
方法概要
修饰符和类型方法说明voiddestroyBlock(Location loc) Destroy a blockdefault List<PackedBlock> Get all blocks@Nullable PackedBlockGet a block by its id@Nullable PackedBlockGet the packed block by its locationGet all block suggestions for tab complete@NotNull StringgetId()Get the content provider's id@Nullable StringgetIdFromItem(@NotNull ItemStack item) Get item's id@Nullable ItemStackGet an item by its idGet all item suggestions (including blocks) for tab complete
-
方法详细资料
-
getId
Get the content provider's id -
getItem
Get an item by its id- 参数:
id- the item's id- 返回:
- the item, 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 by its id- 参数:
id- the block's id- 返回:
- the block, null if not found
-
destroyBlock
Destroy a block- 参数:
loc- the location of the block
-
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
-
getBlockByLocation
Get the packed block by its location- 返回:
- a packed block
-
getAllBlocks
Get all blocks- 返回:
- all blocks in this content provider
-