package net.transit.network.packet; import net.transit.type.Type; /** Static packet with extra data attached. * @author Kyle Gunger * * @param The data type (Object) that the packet transfers * @param The type of metadata */ public class MetaPacket extends StaticPacket { private M metaData; /** Constructor * * @param dat The data to store * @param t The Type of the data * @param meta The metadata to store */ public MetaPacket(D dat, Type t, M meta) { super(dat, t); metaData = meta; } /** Get the metadata of the packet. * * @return The packet's metadata */ public M getMetaData() { return metaData; } }