Interface EntityMetadataProvider


public interface EntityMetadataProvider
This is an interface that provides a list of entity data. This allows custom addon libraries to implement metadata classes for various entities which can then be used in our API.
Since:
2.1.0
  • Method Summary

    Modifier and Type
    Method
    Description
    default List<EntityData>
    Deprecated.
    Does not specify format of metadata, therefore not advised to use this.
    PacketEvents is retrieving the metadata of this specific entity.
  • Method Details

    • entityData

      List<EntityData> entityData(ClientVersion version)
      PacketEvents is retrieving the metadata of this specific entity. PacketEvents provides you with the protocol version that the library is running on to allow you tu specify different metadata depending on the version. You are free to ignore it at the cost of your features not working on all versions.
      Parameters:
      version - The protocol version of the format we expect the metadata to be in.
      Returns:
      Metadata (list of entity data)
    • entityData

      @Deprecated default List<EntityData> entityData()
      Deprecated.
      Does not specify format of metadata, therefore not advised to use this. It will assume the current latest version.
      Similar to entityData(ClientVersion) but does not provide a protocol version. It is not advised to use nor implement this. It is deprecated because it restricts you by not providing you the format in which the metadata should be.
      Returns:
      Metadata (list of entity data)