Class LocalHologramProvider<T>

java.lang.Object
io.github.projectunified.unihologram.api.local.LocalHologramProvider<T>
Type Parameters:
T - the type of the location
All Implemented Interfaces:
HologramProvider<T>
Direct Known Subclasses:
FoliaHologramProvider, HDHologramProvider, VanillaHologramProvider

public abstract class LocalHologramProvider<T> extends Object implements HologramProvider<T>
A hologram provider that stores created holograms
  • Constructor Details

    • LocalHologramProvider

      public LocalHologramProvider()
  • Method Details

    • newHologram

      @NotNull protected abstract @NotNull Hologram<T> newHologram(@NotNull @NotNull String name, @NotNull T location)
      Make a new hologram
      Parameters:
      name - the name of the hologram
      location - the location of the hologram
      Returns:
      the hologram
    • createHologram

      @NotNull public final @NotNull Hologram<T> createHologram(@NotNull @NotNull String name, @NotNull T location)
      Create a new hologram
      Specified by:
      createHologram in interface HologramProvider<T>
      Parameters:
      name - the name of the hologram
      location - the location of the hologram
      Returns:
      the hologram
    • getHologram

      public Optional<Hologram<T>> getHologram(@NotNull @NotNull String name)
      Get a hologram by its name
      Specified by:
      getHologram in interface HologramProvider<T>
      Parameters:
      name - the name of the hologram
      Returns:
      the hologram
    • getAllHolograms

      public Collection<Hologram<T>> getAllHolograms()
      Description copied from interface: HologramProvider
      Get all holograms
      Specified by:
      getAllHolograms in interface HologramProvider<T>
      Returns:
      the collection of holograms