Interface PacketTypeMap<P extends PacketType>


public interface PacketTypeMap<P extends PacketType>
  • Method Details

    • typeByName

      @Nullable P typeByName(String packetTypeName)
      Returns the packet type by the given name.
      Parameters:
      packetTypeName - packet type name
      Returns:
      packet type if present
    • typeById

      @Nullable P typeById(int packetTypeId)
      Returns the packet type by the given id.
      Parameters:
      packetTypeId - packet type id
      Returns:
      packet type if present
    • types

      Collection<P> types()
      Returns a collection of all contained packet types.
      Returns:
      collection of all packet types
    • of

      static <T extends PacketType, E extends T> PacketTypeMap<T> of(Class<E> enumClass)
    • of

      static <T extends PacketType> PacketTypeMap<T> of(Map<String,T> packetsByName, it.unimi.dsi.fastutil.ints.Int2ObjectMap<T> packetsById)
    • of

      static <T extends PacketType> PacketTypeMap<T> of(Map<String,T> packetsByName, T[] packets)