diff options
Diffstat (limited to 'src/main/java/net/transit/network/packet/MetaPacket.java')
-rw-r--r-- | src/main/java/net/transit/network/packet/MetaPacket.java | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/src/main/java/net/transit/network/packet/MetaPacket.java b/src/main/java/net/transit/network/packet/MetaPacket.java new file mode 100644 index 0000000..e4cffdf --- /dev/null +++ b/src/main/java/net/transit/network/packet/MetaPacket.java @@ -0,0 +1,33 @@ +package net.transit.network.packet; + +import net.transit.type.Type; + +public class MetaPacket<D, M> implements IPacket<D> +{ + + private D data; + private M metaData; + private Type<D> type; + + public MetaPacket(D dat, Type<D> t, M meta) + { + data = dat; + type = t; + metaData = meta; + } + + public D getData() + { + return data; + } + + public M getMetaData() + { + return metaData; + } + + @Override + public Type<D> getType() { + return type; + } +} |