mirror of
https://github.com/Melledy/LunarCore.git
synced 2025-12-16 15:24:44 +01:00
Update base packet class again
This commit is contained in:
@@ -146,7 +146,7 @@ public class GameSession {
|
|||||||
|
|
||||||
public void send(BasePacket packet) {
|
public void send(BasePacket packet) {
|
||||||
// Test
|
// Test
|
||||||
if (packet.getOpcode() <= 0) {
|
if (packet.getCmdId() <= 0) {
|
||||||
LunarCore.getLogger().warn("Tried to send packet with missing cmd id!");
|
LunarCore.getLogger().warn("Tried to send packet with missing cmd id!");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -156,11 +156,11 @@ public class GameSession {
|
|||||||
|
|
||||||
// Log
|
// Log
|
||||||
if (LunarCore.getConfig().getLogOptions().packets) {
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
logPacket("SEND", packet.getOpcode(), packet.getData());
|
logPacket("SEND", packet.getCmdId(), packet.getData());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -23,8 +23,8 @@ public class BasePacket {
|
|||||||
this.data = data;
|
this.data = data;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setOpcode(int opcode) {
|
public void setCmdId(int cmdId) {
|
||||||
this.cmdId = opcode;
|
this.cmdId = cmdId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setData(byte[] data) {
|
public void setData(byte[] data) {
|
||||||
|
|||||||
Reference in New Issue
Block a user