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 aCollection
to 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 aRegistryKeySet
to 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 aRegistryKeySet
to aCollection
.- Parameters:
registryKeySet
- TheRegistryKeySet
to convert.registry
- TheRegistry
type 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 aCollection
to aRegistryKeySet
.- Parameters:
collection
- TheCollection
to convert.registryKey
- TheRegistryKey
type to convert to.- Returns:
- The converted
RegistryKeySet
.
-