From aed6ed909ee81beecac2836cb86654efe29e154b Mon Sep 17 00:00:00 2001 From: Kyle Gunger Date: Wed, 15 Apr 2020 15:09:41 -0400 Subject: [Update] Version 0.5.1 More documentation, and an updated list of packets --- src/main/java/net/transit/network/packet/StaticPacket.java | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'src/main/java/net/transit/network/packet/StaticPacket.java') diff --git a/src/main/java/net/transit/network/packet/StaticPacket.java b/src/main/java/net/transit/network/packet/StaticPacket.java index b14e442..eeeae3f 100644 --- a/src/main/java/net/transit/network/packet/StaticPacket.java +++ b/src/main/java/net/transit/network/packet/StaticPacket.java @@ -2,17 +2,28 @@ package net.transit.network.packet; import net.transit.type.Type; -public class StaticPacket implements Packet +/** 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 D 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(D dat, Type t) { data = dat; type = t; } + @Override public D getData() { return data; -- cgit v1.2.3