Skip to content

Commit

Permalink
Add boolean type
Browse files Browse the repository at this point in the history
  • Loading branch information
HttpMarco committed Nov 29, 2024
1 parent c7f0b0d commit b3ab9da
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -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);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
@Getter
@Accessors(fluent = true)
@AllArgsConstructor
public abstract class IntBasePacket extends Packet {
public class IntBasePacket extends Packet {

private int value;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
@Getter
@Accessors(fluent = true)
@AllArgsConstructor
public abstract class PacketBasePacket extends Packet {
public class PacketBasePacket extends Packet {

private Packet packet;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
@Getter
@Accessors(fluent = true)
@AllArgsConstructor
public abstract class StringBasePacket extends Packet {
public class StringBasePacket extends Packet {

private String value;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
@Getter
@Accessors(fluent = true)
@AllArgsConstructor
public abstract class UuidBasePacket extends Packet {
public class UuidBasePacket extends Packet {

private UUID uuid;

Expand Down

0 comments on commit b3ab9da

Please sign in to comment.