diff --git a/src/main/java/dev/httpmarco/netline/packet/basic/BooleanBasePacket.java b/src/main/java/dev/httpmarco/netline/packet/basic/BooleanBasePacket.java new file mode 100644 index 0000000..8594a10 --- /dev/null +++ b/src/main/java/dev/httpmarco/netline/packet/basic/BooleanBasePacket.java @@ -0,0 +1,26 @@ +package dev.httpmarco.netline.packet.basic; + +import dev.httpmarco.netline.packet.Packet; +import dev.httpmarco.netline.packet.PacketBuffer; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.experimental.Accessors; +import org.jetbrains.annotations.NotNull; + +@Accessors(fluent = true) +@Getter +@AllArgsConstructor +public class BooleanBasePacket extends Packet { + + private boolean value; + + @Override + public void read(@NotNull PacketBuffer packetBuffer) { + this.value = packetBuffer.readBoolean(); + } + + @Override + public void write(@NotNull PacketBuffer packetBuffer) { + packetBuffer.writeBoolean(value); + } +} diff --git a/src/main/java/dev/httpmarco/netline/packet/basic/IntBasePacket.java b/src/main/java/dev/httpmarco/netline/packet/basic/IntBasePacket.java index b4e4a75..21c8184 100644 --- a/src/main/java/dev/httpmarco/netline/packet/basic/IntBasePacket.java +++ b/src/main/java/dev/httpmarco/netline/packet/basic/IntBasePacket.java @@ -9,7 +9,7 @@ @Getter @Accessors(fluent = true) @AllArgsConstructor -public abstract class IntBasePacket extends Packet { +public class IntBasePacket extends Packet { private int value; diff --git a/src/main/java/dev/httpmarco/netline/packet/basic/PacketBasePacket.java b/src/main/java/dev/httpmarco/netline/packet/basic/PacketBasePacket.java index 06b1cc5..01e7047 100644 --- a/src/main/java/dev/httpmarco/netline/packet/basic/PacketBasePacket.java +++ b/src/main/java/dev/httpmarco/netline/packet/basic/PacketBasePacket.java @@ -12,7 +12,7 @@ @Getter @Accessors(fluent = true) @AllArgsConstructor -public abstract class PacketBasePacket extends Packet { +public class PacketBasePacket extends Packet { private Packet packet; diff --git a/src/main/java/dev/httpmarco/netline/packet/basic/StringBasePacket.java b/src/main/java/dev/httpmarco/netline/packet/basic/StringBasePacket.java index 10c17e6..ec0e482 100644 --- a/src/main/java/dev/httpmarco/netline/packet/basic/StringBasePacket.java +++ b/src/main/java/dev/httpmarco/netline/packet/basic/StringBasePacket.java @@ -10,7 +10,7 @@ @Getter @Accessors(fluent = true) @AllArgsConstructor -public abstract class StringBasePacket extends Packet { +public class StringBasePacket extends Packet { private String value; diff --git a/src/main/java/dev/httpmarco/netline/packet/basic/UuidBasePacket.java b/src/main/java/dev/httpmarco/netline/packet/basic/UuidBasePacket.java index 3def7eb..8685cdb 100644 --- a/src/main/java/dev/httpmarco/netline/packet/basic/UuidBasePacket.java +++ b/src/main/java/dev/httpmarco/netline/packet/basic/UuidBasePacket.java @@ -12,7 +12,7 @@ @Getter @Accessors(fluent = true) @AllArgsConstructor -public abstract class UuidBasePacket extends Packet { +public class UuidBasePacket extends Packet { private UUID uuid;