package net.cshift.transit.network.packet; import net.cshift.transit.type.*; /** Simple packet which stores an unchanging value. * @author Kyle Gunger * * @param The data type (Object) that the packet transfers. */ public class StaticPacket implements IStaticPacket { private Object data; private Type type; /** Constructor. Stores the given data and uses the given type. * * @param dat The packet's data * @param t The packet's type */ public StaticPacket(Object dat, Type t) { data = dat; type = t; } @Override public Object getData() { return data; } @Override public Type getType() { return type; } }