Class EntityStore<T extends GlowEntity>

Type Parameters:
T - The type of entity being stored.
Direct Known Subclasses:
AnimalStore, ArrowStore, BoatStore, EnderCrystalStore, EnderDragonStore, FireballStore, FireworkStore, HangingStore, LivingEntityStore, MinecartStore, MonsterStore, SplashPotionStore, WaterMobStore

public abstract class EntityStore<T extends GlowEntity> extends Object
The base for entity store classes.
  • Field Details

    • type

      protected final Class<? extends T extends GlowEntity> type
    • entityType

      @NonNls protected final @NonNls String entityType
  • Constructor Details

    • EntityStore

      public EntityStore(Class<? extends T> type, org.bukkit.entity.EntityType entityType)
    • EntityStore

      public EntityStore(Class<? extends T> type, String entityType)
  • Method Details

    • createEntity

      public abstract T createEntity(org.bukkit.Location location, CompoundTag compound)
      Create a new entity of this store's type at the given location. The load method will be called separately.
      location - The location.
      compound - The entity's tag, if extra data is needed.
      The new entity.
    • createEntity

      public T createEntity(org.bukkit.Location location)
      Create a new entity of this store's type at the given location, with all attributes set to their defaults.
      location - The location.
      The new entity.
    • load

      public void load(T entity, CompoundTag tag)
      Load data into an existing entity of the appropriate type from the given compound tag.
      entity - The target entity.
      tag - The entity's tag.
    • save

      public void save(T entity, CompoundTag tag)
      Save information about this entity to the given tag.
      entity - The entity to save.
      tag - The target tag.
    • getType

      public Class<? extends T> getType()
    • getEntityType

      public String getEntityType()
    • equals

      public boolean equals(Object o)
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      hashCode in class Object
    • toString

      public String toString()
      toString in class Object