diff --git a/src/main/java/uulm/teamname/marvelous/gamelibrary/messages/EventMessage.java b/src/main/java/uulm/teamname/marvelous/gamelibrary/messages/EventMessage.java index d10474b..e06968a 100644 --- a/src/main/java/uulm/teamname/marvelous/gamelibrary/messages/EventMessage.java +++ b/src/main/java/uulm/teamname/marvelous/gamelibrary/messages/EventMessage.java @@ -8,10 +8,7 @@ import java.util.HashMap; import java.util.Objects; /** Represents a message sent between client and server and contains all possible data. */ -public class EventMessage { - - /** This is the message type. It is either REQUESTS or EVENTS, everything else would be invalid here */ - public MessageType messageType; +public class EventMessage extends BasicMessage { /** The list of {@link Event Events} sent inside the message. */ public Event[] messages; diff --git a/src/main/java/uulm/teamname/marvelous/gamelibrary/messages/ReconnectMessage.java b/src/main/java/uulm/teamname/marvelous/gamelibrary/messages/ReconnectMessage.java index a6c745c..cd9f354 100644 --- a/src/main/java/uulm/teamname/marvelous/gamelibrary/messages/ReconnectMessage.java +++ b/src/main/java/uulm/teamname/marvelous/gamelibrary/messages/ReconnectMessage.java @@ -1,6 +1,6 @@ package uulm.teamname.marvelous.gamelibrary.messages; -public class ReconnectMessage { +public class ReconnectMessage extends BasicMessage { /** Whether the client wants to reconnect to the previously running game */ public Boolean reconnect; diff --git a/src/main/java/uulm/teamname/marvelous/gamelibrary/messages/RequestMessage.java b/src/main/java/uulm/teamname/marvelous/gamelibrary/messages/RequestMessage.java index a1c094a..73777ca 100644 --- a/src/main/java/uulm/teamname/marvelous/gamelibrary/messages/RequestMessage.java +++ b/src/main/java/uulm/teamname/marvelous/gamelibrary/messages/RequestMessage.java @@ -9,10 +9,7 @@ import java.util.HashMap; import java.util.Objects; /** Represents a message sent between client and server and contains all possible data. */ -public class RequestMessage { - - /** This is the message type. It is either REQUESTS or EVENTS, everything else would be invalid here */ - public MessageType messageType; +public class RequestMessage extends BasicMessage { /** The list of {@link Event Events} sent inside the message. */ public Request[] messages;