diff --git a/src/de/steamwar/network/packets/client/ExecuteCommandPacket.java b/src/de/steamwar/network/packets/client/ExecuteCommandPacket.java index aec2fcc..62c3acb 100644 --- a/src/de/steamwar/network/packets/client/ExecuteCommandPacket.java +++ b/src/de/steamwar/network/packets/client/ExecuteCommandPacket.java @@ -20,15 +20,16 @@ package de.steamwar.network.packets.client; import de.steamwar.network.packets.server.ServerNetworkHandler; -import lombok.AllArgsConstructor; import lombok.Data; +import lombok.NonNull; @Data -@AllArgsConstructor public class ExecuteCommandPacket extends ClientPacket { private static final long serialVersionUID = 6283457297487602016L; + @NonNull private int playerId; + @NonNull private String command; @Override diff --git a/src/de/steamwar/network/packets/client/ImALobbyPacket.java b/src/de/steamwar/network/packets/client/ImALobbyPacket.java index 8968c37..5656f63 100644 --- a/src/de/steamwar/network/packets/client/ImALobbyPacket.java +++ b/src/de/steamwar/network/packets/client/ImALobbyPacket.java @@ -20,11 +20,9 @@ package de.steamwar.network.packets.client; import de.steamwar.network.packets.server.ServerNetworkHandler; -import lombok.AllArgsConstructor; import lombok.Data; @Data -@AllArgsConstructor public class ImALobbyPacket extends ClientPacket { private static final long serialVersionUID = 8110246509205246654L; diff --git a/src/de/steamwar/network/packets/client/InventoryCallbackPacket.java b/src/de/steamwar/network/packets/client/InventoryCallbackPacket.java index df605a4..c28c163 100644 --- a/src/de/steamwar/network/packets/client/InventoryCallbackPacket.java +++ b/src/de/steamwar/network/packets/client/InventoryCallbackPacket.java @@ -22,13 +22,17 @@ package de.steamwar.network.packets.client; import de.steamwar.network.packets.server.ServerNetworkHandler; import lombok.AllArgsConstructor; import lombok.Data; +import lombok.NonNull; @Data @AllArgsConstructor public class InventoryCallbackPacket extends ClientPacket { private static final long serialVersionUID = -261823209186008718L; + @NonNull private int position; + @NonNull private int owner; + @NonNull private CallbackType type; private ClickType clickType; diff --git a/src/de/steamwar/network/packets/client/PrepareSchemPacket.java b/src/de/steamwar/network/packets/client/PrepareSchemPacket.java index 6b5f6e3..55d2b39 100644 --- a/src/de/steamwar/network/packets/client/PrepareSchemPacket.java +++ b/src/de/steamwar/network/packets/client/PrepareSchemPacket.java @@ -20,16 +20,18 @@ package de.steamwar.network.packets.client; import de.steamwar.network.packets.server.ServerNetworkHandler; -import lombok.AllArgsConstructor; import lombok.Data; +import lombok.NonNull; @Data -@AllArgsConstructor public class PrepareSchemPacket extends ClientPacket { private static final long serialVersionUID = -4798561188105813349L; + @NonNull private int player; + @NonNull private int schem; + @NonNull private String schemType; @Override diff --git a/src/de/steamwar/network/packets/common/FightEndsPacket.java b/src/de/steamwar/network/packets/common/FightEndsPacket.java index dfea7ba..f046538 100644 --- a/src/de/steamwar/network/packets/common/FightEndsPacket.java +++ b/src/de/steamwar/network/packets/common/FightEndsPacket.java @@ -20,21 +20,26 @@ package de.steamwar.network.packets.common; import de.steamwar.network.packets.NetworkHandler; -import lombok.AllArgsConstructor; import lombok.Data; +import lombok.NonNull; import java.util.List; @Data -@AllArgsConstructor public class FightEndsPacket extends CommonPacket { private static final long serialVersionUID = 1279352415549011332L; + @NonNull private byte win; + @NonNull private int blueSchem; + @NonNull private int redSchem; + @NonNull private List bluePlayers; + @NonNull private List redPlayers; + @NonNull private String gameMode; @Override diff --git a/src/de/steamwar/network/packets/common/FightInfoPacket.java b/src/de/steamwar/network/packets/common/FightInfoPacket.java index e273e2b..5295d25 100644 --- a/src/de/steamwar/network/packets/common/FightInfoPacket.java +++ b/src/de/steamwar/network/packets/common/FightInfoPacket.java @@ -20,29 +20,42 @@ package de.steamwar.network.packets.common; import de.steamwar.network.packets.NetworkHandler; -import lombok.AllArgsConstructor; import lombok.Data; +import lombok.NonNull; import java.util.List; @Data -@AllArgsConstructor public class FightInfoPacket extends CommonPacket{ private static final long serialVersionUID = 7448644597856605853L; + @NonNull private String serverName; + @NonNull private String gameMode; + @NonNull private String arena; + @NonNull private String blueName; + @NonNull private String redName; + @NonNull private String fightState; + @NonNull private int countdown; + @NonNull private int blueLeader; + @NonNull private int redLeader; + @NonNull private int blueSchem; + @NonNull private int redSchem; + @NonNull private List bluePlayers; + @NonNull private List redPlayers; + @NonNull private List spectators; @Override diff --git a/src/de/steamwar/network/packets/server/BaumemberUpdatePacket.java b/src/de/steamwar/network/packets/server/BaumemberUpdatePacket.java index 386a0fc..ac610d5 100644 --- a/src/de/steamwar/network/packets/server/BaumemberUpdatePacket.java +++ b/src/de/steamwar/network/packets/server/BaumemberUpdatePacket.java @@ -20,11 +20,9 @@ package de.steamwar.network.packets.server; import de.steamwar.network.packets.client.ClientNetworkHandler; -import lombok.AllArgsConstructor; import lombok.Data; @Data -@AllArgsConstructor public class BaumemberUpdatePacket extends ServerPacket{ private static final long serialVersionUID = 6863118892424244051L; diff --git a/src/de/steamwar/network/packets/server/CloseInventoryPacket.java b/src/de/steamwar/network/packets/server/CloseInventoryPacket.java index 660e3ba..7ea7e6a 100644 --- a/src/de/steamwar/network/packets/server/CloseInventoryPacket.java +++ b/src/de/steamwar/network/packets/server/CloseInventoryPacket.java @@ -20,14 +20,14 @@ package de.steamwar.network.packets.server; import de.steamwar.network.packets.client.ClientNetworkHandler; -import lombok.AllArgsConstructor; import lombok.Data; +import lombok.NonNull; @Data -@AllArgsConstructor public class CloseInventoryPacket extends ServerPacket { private static final long serialVersionUID = -2191021190060504521L; + @NonNull private int playerId; @Override diff --git a/src/de/steamwar/network/packets/server/InventoryPacket.java b/src/de/steamwar/network/packets/server/InventoryPacket.java index da59488..1a507d1 100644 --- a/src/de/steamwar/network/packets/server/InventoryPacket.java +++ b/src/de/steamwar/network/packets/server/InventoryPacket.java @@ -20,19 +20,22 @@ package de.steamwar.network.packets.server; import de.steamwar.network.packets.client.ClientNetworkHandler; -import lombok.AllArgsConstructor; import lombok.Data; +import lombok.NonNull; import java.util.Map; @Data -@AllArgsConstructor public class InventoryPacket extends ServerPacket { private static final long serialVersionUID = 8071052544654047316L; + @NonNull private String title; + @NonNull private int player; + @NonNull private int size; + @NonNull private Map items; @Override diff --git a/src/de/steamwar/network/packets/server/PingPacket.java b/src/de/steamwar/network/packets/server/PingPacket.java index 30342c3..f2ca61e 100644 --- a/src/de/steamwar/network/packets/server/PingPacket.java +++ b/src/de/steamwar/network/packets/server/PingPacket.java @@ -20,13 +20,13 @@ package de.steamwar.network.packets.server; import de.steamwar.network.packets.client.ClientNetworkHandler; -import lombok.AllArgsConstructor; import lombok.Data; +import lombok.NonNull; @Data -@AllArgsConstructor public class PingPacket extends ServerPacket { private static final long serialVersionUID = 714647343959550378L; + @NonNull private int id; @Override diff --git a/src/de/steamwar/network/packets/server/StartingServerPacket.java b/src/de/steamwar/network/packets/server/StartingServerPacket.java index 30d32fb..bc0cb66 100644 --- a/src/de/steamwar/network/packets/server/StartingServerPacket.java +++ b/src/de/steamwar/network/packets/server/StartingServerPacket.java @@ -20,13 +20,13 @@ package de.steamwar.network.packets.server; import de.steamwar.network.packets.client.ClientNetworkHandler; -import lombok.AllArgsConstructor; import lombok.Data; +import lombok.NonNull; @Data -@AllArgsConstructor public class StartingServerPacket extends ServerPacket { private static final long serialVersionUID = 2808607245898121801L; + @NonNull private int user; @Override