Interface OnyxNamespace

All Known Implementing Classes:
OnyxNamespaceImpl

public interface OnyxNamespace
The root containers/registries for all custom content. They manage scope, id's, and interact with the resource pack generator.
  • Method Details

    • getKey

      NamespacedKey getKey()
      Gets the key associated with this namespace.
      Returns:
      The underlying Bukkit NamespacedKey.
    • item

      OnyxItem item(String id)
      Creates or looks up an OnyxItem.
      Parameters:
      id - The unique identifier for the item (e.g., "strawberry").
      Returns:
      The OnyxItem configuration and creation wrapper.
    • matchItem

      OnyxItem matchItem(ItemStack stack)
      Checks the given ItemStack and matches it to a registered OnyxItem if it exists.
      Parameters:
      stack - The ItemStack to check.
      Returns:
      The matching OnyxItem or null if not found.
    • block

      OnyxBlock block(String id)
      Creates or looks up an OnyxBlock.
      Parameters:
      id - The unique identifier for the item (e.g., "marble").
      Returns:
      The OnyxBlock configuration and creation wrapper.
    • matchBlock

      OnyxBlock matchBlock(Block block)
      Checks the given block to determine if it is tracking an OnyxBlock.
      Parameters:
      block - The physical Block to check.
      Returns:
      The matching OnyxBlock or null if not found.