Class KeyHolder<T>

java.lang.Object
net.mathias2246.buildmc.util.registry.KeyHolder<T>
All Implemented Interfaces:
org.bukkit.Keyed

public class KeyHolder<T> extends Object implements org.bukkit.Keyed
A Helper class for storing an object instance with a NamespacedKey.

This object can then be used for storing a non-Keyed instance inside a Registry.

  • Constructor Details

    • KeyHolder

      public KeyHolder(@NotNull @NotNull org.bukkit.NamespacedKey key, @NotNull T value)
  • Method Details

    • getValue

      @NotNull public T getValue()
    • getKey

      @NotNull public @NotNull org.bukkit.NamespacedKey getKey()
      Specified by:
      getKey in interface org.bukkit.Keyed