Class EntityTrackerRegistry

java.lang.Object
kr.toxicity.model.api.tracker.EntityTrackerRegistry

public final class EntityTrackerRegistry extends Object
  • Field Details

    • TRACKING_ID

      public static final org.bukkit.NamespacedKey TRACKING_ID
      Tracker's namespace.
  • Method Details

    • registry

      @Nullable public static @Nullable EntityTrackerRegistry registry(@NotNull @NotNull UUID uuid)
    • registry

      @Nullable public static @Nullable EntityTrackerRegistry registry(int id)
    • registries

      public static void registries(@NotNull @NotNull Consumer<EntityTrackerRegistry> consumer)
    • registries

      @NotNull public static @NotNull @Unmodifiable List<EntityTrackerRegistry> registries()
    • registry

      @Nullable public static @Nullable EntityTrackerRegistry registry(@NotNull @NotNull org.bukkit.entity.Entity entity)
    • getOrCreate

      @Internal @NotNull public static @NotNull EntityTrackerRegistry getOrCreate(@NotNull @NotNull org.bukkit.entity.Entity entity)
    • hasModelData

      public static boolean hasModelData(@NotNull @NotNull org.bukkit.entity.Entity entity)
    • entity

      @NotNull public @NotNull org.bukkit.entity.Entity entity()
    • uuid

      @NotNull public @NotNull UUID uuid()
    • id

      public int id()
    • adapter

      @NotNull public @NotNull EntityAdapter adapter()
    • trackers

      @NotNull public @NotNull @Unmodifiable Collection<EntityTracker> trackers()
    • tracker

      @Nullable public @Nullable EntityTracker tracker(@Nullable @Nullable String key)
    • first

      @Nullable public @Nullable EntityTracker first()
    • create

      @Internal @NotNull public @NotNull EntityTracker create(@NotNull @NotNull String key, @NotNull @NotNull Function<EntityTrackerRegistry,EntityTracker> supplier)
    • getOrCreate

      @NotNull public @NotNull EntityTracker getOrCreate(@NotNull @NotNull String key, @NotNull @NotNull Function<EntityTrackerRegistry,EntityTracker> supplier)
    • remove

      public boolean remove(@NotNull @NotNull String key)
    • isClosed

      public boolean isClosed()
    • close

      public boolean close()
    • reload

      public void reload()
    • refresh

      public void refresh()
    • despawn

      public void despawn()
    • load

      public void load(@NotNull @NotNull Stream<TrackerData> stream)
    • load

      public void load()
    • save

      public void save()
    • displays

      @NotNull public @NotNull Stream<ModelDisplay> displays()
    • serialize

      @NotNull public @NotNull com.google.gson.JsonArray serialize()
    • isSpawned

      public boolean isSpawned(@NotNull @NotNull org.bukkit.entity.Player player)
      Checks this tracker is spawned by some player
      Parameters:
      player - player
      Returns:
      is spawned
    • isSpawned

      public boolean isSpawned(@NotNull @NotNull UUID uuid)
      Checks this tracker is spawned by some player
      Parameters:
      uuid - player's uuid
      Returns:
      is spawned
    • spawn

      public boolean spawn(@NotNull @NotNull org.bukkit.entity.Player player)
      Spawns this tracker to some player
      Parameters:
      player - target player
      Returns:
      success
    • spawnIfNotSpawned

      public boolean spawnIfNotSpawned(@NotNull @NotNull org.bukkit.entity.Player player)
      Spawns not spawned tracker to some player
      Parameters:
      player - target player
      Returns:
      success
    • viewedPlayer

      @NotNull public @NotNull Stream<PlayerChannelHandler> viewedPlayer()
    • remove

      public boolean remove(@NotNull @NotNull org.bukkit.entity.Player player)
    • hideOption

      @NotNull public @NotNull EntityHideOption hideOption(@NotNull @NotNull UUID uuid)
    • mountedHitBox

      @NotNull public @NotNull @Unmodifiable Map<UUID,EntityTrackerRegistry.MountedHitBox> mountedHitBox()
      Gets currently mounted hitbox
      Returns:
      mounted hitbox
    • hasPassenger

      public boolean hasPassenger()
      Checks this tracker has passenger
      Returns:
      has passenger
    • hasControllingPassenger

      public boolean hasControllingPassenger()
      Checks this tracker has controlling passenger
      Returns:
      has controlling passenger