mirror of
https://github.com/Xiao-MoMi/craft-engine.git
synced 2026-01-04 15:41:38 +00:00
添加屏蔽部分包的功能
This commit is contained in:
@@ -899,7 +899,12 @@ public class BukkitNetworkManager implements NetworkManager, Listener, PluginMes
|
||||
}
|
||||
|
||||
private void onNMSPacketReceive(NetWorkUser user, NMSPacketEvent event, Object packet) {
|
||||
Debugger.PACKET.debug(() -> "[C->S]" + packet.getClass());
|
||||
Debugger.PACKET.debug(() -> {
|
||||
if (Config.isPacketIgnored(packet.getClass())) {
|
||||
return null;
|
||||
}
|
||||
return "[C->S]" + packet.getClass();
|
||||
});
|
||||
handleReceiveNMSPacket(user, event, packet);
|
||||
}
|
||||
|
||||
@@ -910,7 +915,12 @@ public class BukkitNetworkManager implements NetworkManager, Listener, PluginMes
|
||||
onNMSPacketSend(player, event, p);
|
||||
}
|
||||
} else {
|
||||
Debugger.PACKET.debug(() -> "[S->C]" + packet.getClass());
|
||||
Debugger.PACKET.debug(() -> {
|
||||
if (Config.isPacketIgnored(packet.getClass())) {
|
||||
return null;
|
||||
}
|
||||
return "[S->C]" + packet.getClass();
|
||||
});
|
||||
handleSendNMSPacket(player, event, packet);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user