Package org.bukkit

Class Registry.SimpleRegistry<T extends Enum<T> & Keyed>

    • Constructor Detail

      • SimpleRegistry

        protected SimpleRegistry​(@NotNull
                                 @NotNull Class<T> type)
      • SimpleRegistry

        protected SimpleRegistry​(@NotNull
                                 @NotNull Class<T> type,
                                 @NotNull
                                 @NotNull Predicate<T> predicate)
    • Method Detail

      • get

        @Nullable
        public T get​(@NotNull
                     @NotNull NamespacedKey key)
        Description copied from interface: Registry
        Get the object by its key.
        Specified by:
        get in interface Registry<T extends Enum<T> & Keyed>
        Parameters:
        key - non-null key
        Returns:
        item or null if does not exist