Class ComponentUtils
java.lang.Object
org.skriptlang.skript.bukkit.itemcomponents.ComponentUtils
Utility class for components.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T extends org.bukkit.Keyed>
io.papermc.paper.registry.set.RegistryKeySet<T> collectionToRegistryKeySet(Collection<T> collection, io.papermc.paper.registry.RegistryKey<T> registryKey) Convert aCollectionto aRegistryKeySet.static <T extends org.bukkit.Keyed>
Collection<T> registryKeySetToCollection(@Nullable io.papermc.paper.registry.set.RegistryKeySet<T> registryKeySet, org.bukkit.Registry<T> registry) Convert aRegistryKeySetto aCollection.
-
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 aRegistryKeySetto aCollection.- Parameters:
registryKeySet- TheRegistryKeySetto convert.registry- TheRegistrytype ofregistryKeySet- 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 aCollectionto aRegistryKeySet.- Parameters:
collection- TheCollectionto convert.registryKey- TheRegistryKeytype to convert to.- Returns:
- The converted
RegistryKeySet.
-