Class NamespaceRegistry
java.lang.Object
com.zombienw.onyxlib.impl.registry.NamespaceRegistry
Manages the relationship between all the OnyxLib-using plugins.
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidclear()Resets the registry.static @NonNull Collection<OnyxNamespaceImpl> Gets all registered namespaces.static @Nullable OnyxElementgetElement(@NonNull NamespacedKey key) Gets an item/block from all namespaces using its full key.static @Nullable OnyxNamespaceImplgetNamespace(@NonNull String pluginName) Finds a namespace without creating it.static OnyxNamespacegetOrCreate(@NonNull Plugin plugin) Finds or create a namespace for a plugin.static voidlockAll()Locks all namespaces to prevent item registration.
-
Method Details
-
getOrCreate
Finds or create a namespace for a plugin. -
getNamespace
Finds a namespace without creating it. -
getAllNamespaces
Gets all registered namespaces. -
getElement
Gets an item/block from all namespaces using its full key. -
lockAll
public static void lockAll()Locks all namespaces to prevent item registration. -
clear
public static void clear()Resets the registry. Meant for server reloads.
-