-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
30 additions
and
4 deletions.
There are no files selected for viewing
26 changes: 26 additions & 0 deletions
26
src/main/java/dev/httpmarco/netline/packet/basic/BooleanBasePacket.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters