Class OnyxNamespaceImpl
java.lang.Object
com.zombienw.onyxlib.impl.registry.OnyxNamespaceImpl
- All Implemented Interfaces:
OnyxNamespace
Implements OnyxNamespaces
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCreates or looks up an OnyxBlock.getElement(String id) getItems()getKey()Gets the key associated with this namespace.Creates or looks up an OnyxItem.voidlock()Locks the namespace to prevent further items from being registeredmatchBlock(Block block) Checks the given block to determine if it is tracking an OnyxBlock.Checks the given ItemStack and matches it to a registered OnyxItem if it exists.
-
Constructor Details
-
OnyxNamespaceImpl
-
-
Method Details
-
getPlugin
-
getKey
Description copied from interface:OnyxNamespaceGets the key associated with this namespace.- Specified by:
getKeyin interfaceOnyxNamespace- Returns:
- The underlying Bukkit NamespacedKey.
-
item
Description copied from interface:OnyxNamespaceCreates or looks up an OnyxItem.- Specified by:
itemin interfaceOnyxNamespace- Parameters:
id- The unique identifier for the item (e.g., "strawberry").- Returns:
- The OnyxItem configuration and creation wrapper.
-
block
Description copied from interface:OnyxNamespaceCreates or looks up an OnyxBlock.- Specified by:
blockin interfaceOnyxNamespace- Parameters:
id- The unique identifier for the item (e.g., "marble").- Returns:
- The OnyxBlock configuration and creation wrapper.
-
matchItem
Description copied from interface:OnyxNamespaceChecks the given ItemStack and matches it to a registered OnyxItem if it exists.- Specified by:
matchItemin interfaceOnyxNamespace- Parameters:
stack- The ItemStack to check.- Returns:
- The matching OnyxItem or
nullif not found.
-
matchBlock
Description copied from interface:OnyxNamespaceChecks the given block to determine if it is tracking an OnyxBlock.- Specified by:
matchBlockin interfaceOnyxNamespace- Parameters:
block- The physical Block to check.- Returns:
- The matching OnyxBlock or
nullif not found.
-
lock
public void lock()Locks the namespace to prevent further items from being registered -
getItems
-
getItem
-
getBlocks
-
getBlock
-
getElement
-
getElements
-