Class EntityRegistry

java.lang.Object
net.glowstone.entity.EntityRegistry

public class EntityRegistry extends Object
  • Constructor Details

    • EntityRegistry

      public EntityRegistry()
  • Method Details

    • getEntity

      public static Class<? extends GlowEntity> getEntity(org.bukkit.entity.EntityType type)
    • getEntity

      public static Class<? extends GlowEntity> getEntity(Class<? extends org.bukkit.entity.Entity> clazz)
      Gets the implementation class for the given entity interface class.
      Parameters:
      clazz - the entity interface class
      Returns:
      the implementation class
    • registerCustomEntity

      public static void registerCustomEntity(CustomEntityDescriptor<? extends GlowEntity> descriptor)
      Registers a custom entity type.
      Parameters:
      descriptor - the entity type to register; all fields except CustomEntityDescriptor.getStorage() must be non-null
    • getCustomEntityDescriptor

      public static CustomEntityDescriptor getCustomEntityDescriptor(String id)
    • isCustomEntityRegistered

      public static boolean isCustomEntityRegistered(String id)
    • getRegisteredCustomEntities

      public static List<CustomEntityDescriptor> getRegisteredCustomEntities()