接口 ContentProvider

所有已知实现类:
CraftEngineContentProvider, EcoItemsContentProvider, ExecutableItemsContentProvider, ItemsAdderContentProvider, MinecraftContentProvider, MMOItemsContentProvider, NexoContentProvider, OraxenContentProvider

public interface ContentProvider
  • 方法详细资料

    • getId

      @NotNull @NotNull String getId()
      Get the content provider's id
    • getItem

      @Nullable @Nullable ItemStack getItem(@NotNull @NotNull String id)
      Get an item by its id
      参数:
      id - the item's id
      返回:
      the item, null if not found
    • getIdFromItem

      @Nullable @Nullable String getIdFromItem(@NotNull @NotNull ItemStack item)
      Get item's id
      参数:
      item - the item
      返回:
      the item's id in content provider, null if not found
    • getBlock

      @Nullable @Nullable PackedBlock getBlock(@NotNull @NotNull String id)
      Get a block by its id
      参数:
      id - the block's id
      返回:
      the block, null if not found
    • destroyBlock

      void destroyBlock(Location loc)
      Destroy a block
      参数:
      loc - the location of the block
    • getItemSuggestions

      List<String> getItemSuggestions()
      Get all item suggestions (including blocks) for tab complete
      返回:
      a list of item suggestion
    • getBlockSuggestions

      List<String> getBlockSuggestions()
      Get all block suggestions for tab complete
      返回:
      a list of block suggestion
    • getBlockByLocation

      @Nullable @Nullable PackedBlock getBlockByLocation(Location loc)
      Get the packed block by its location
      返回:
      a packed block
    • getAllBlocks

      default List<PackedBlock> getAllBlocks()
      Get all blocks
      返回:
      all blocks in this content provider