Update base packet class again

This commit is contained in:
Melledy
2023-11-29 23:03:29 -08:00
parent bbe9b49ea7
commit 89acec994a
2 changed files with 5 additions and 5 deletions

View File

@@ -146,7 +146,7 @@ public class GameSession {
public void send(BasePacket packet) {
// Test
if (packet.getOpcode() <= 0) {
if (packet.getCmdId() <= 0) {
LunarCore.getLogger().warn("Tried to send packet with missing cmd id!");
return;
}
@@ -156,11 +156,11 @@ public class GameSession {
// Log
if (LunarCore.getConfig().getLogOptions().packets) {
if (LunarCore.getConfig().getLogOptions().filterLoopingPackets && CmdIdUtils.LOOP_PACKETS.contains(packet.getOpcode())) {
if (LunarCore.getConfig().getLogOptions().filterLoopingPackets && CmdIdUtils.LOOP_PACKETS.contains(packet.getCmdId())) {
return;
}
logPacket("SEND", packet.getOpcode(), packet.getData());
logPacket("SEND", packet.getCmdId(), packet.getData());
}
}

View File

@@ -23,8 +23,8 @@ public class BasePacket {
this.data = data;
}
public void setOpcode(int opcode) {
this.cmdId = opcode;
public void setCmdId(int cmdId) {
this.cmdId = cmdId;
}
public void setData(byte[] data) {