Class NamespaceRegistry

java.lang.Object
com.zombienw.onyxlib.impl.registry.NamespaceRegistry

public final class NamespaceRegistry extends Object
Manages the relationship between all the OnyxLib-using plugins.
  • Method Details

    • getOrCreate

      public static OnyxNamespace getOrCreate(@NonNull Plugin plugin)
      Finds or create a namespace for a plugin.
    • getNamespace

      public static @Nullable OnyxNamespaceImpl getNamespace(@NonNull String pluginName)
      Finds a namespace without creating it.
    • getAllNamespaces

      public static @NonNull Collection<OnyxNamespaceImpl> getAllNamespaces()
      Gets all registered namespaces.
    • getElement

      public static @Nullable OnyxElement getElement(@NonNull NamespacedKey key)
      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.