diff --git a/Server/src/main/java/uulm/teamname/marvelous/server/lobby/pipelining/Packet.java b/Server/src/main/java/uulm/teamname/marvelous/server/lobby/pipelining/Packet.java index e3cab2f..1762234 100644 --- a/Server/src/main/java/uulm/teamname/marvelous/server/lobby/pipelining/Packet.java +++ b/Server/src/main/java/uulm/teamname/marvelous/server/lobby/pipelining/Packet.java @@ -4,10 +4,7 @@ import uulm.teamname.marvelous.gamelibrary.requests.Request; import uulm.teamname.marvelous.gamelibrary.requests.RequestType; import uulm.teamname.marvelous.server.lobbymanager.Participant; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Iterator; -import java.util.List; +import java.util.*; public class Packet extends ArrayList { @@ -41,4 +38,17 @@ public class Packet extends ArrayList { return origin; } + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + Packet packet = (Packet) o; + return Objects.equals(origin, packet.origin); + } + + @Override + public int hashCode() { + return Objects.hash(super.hashCode(), origin); + } }