Class ComponentUtils

java.lang.Object
org.skriptlang.skript.bukkit.itemcomponents.ComponentUtils

public class ComponentUtils extends Object
Utility class for components.
  • Constructor Details

    • ComponentUtils

      public ComponentUtils()
  • Method Details

    • registryKeySetToCollection

      public static <T extends org.bukkit.Keyed> Collection<T> registryKeySetToCollection(@Nullable @Nullable io.papermc.paper.registry.set.RegistryKeySet<T> registryKeySet, org.bukkit.Registry<T> registry)
      Convert a RegistryKeySet to a Collection.
      Parameters:
      registryKeySet - The RegistryKeySet to convert.
      registry - The Registry type of registryKeySet
      Returns:
      The converted Collection.
    • collectionToRegistryKeySet

      public static <T extends org.bukkit.Keyed> io.papermc.paper.registry.set.RegistryKeySet<T> collectionToRegistryKeySet(Collection<T> collection, io.papermc.paper.registry.RegistryKey<T> registryKey)
      Convert a Collection to a RegistryKeySet.
      Parameters:
      collection - The Collection to convert.
      registryKey - The RegistryKey type to convert to.
      Returns:
      The converted RegistryKeySet.