attempt to completely nuke reply_to_custom_queries
Some checks failed
Rust Build / build (push) Has been cancelled

This commit is contained in:
Soph :3 2026-02-08 15:46:50 +02:00
parent 7ebe36ea0a
commit 933efac6f6

View file

@ -59,9 +59,9 @@ pub struct ViaVersionPlugin {
impl Plugin for ViaVersionPlugin { impl Plugin for ViaVersionPlugin {
fn build(&self, app: &mut App) { fn build(&self, app: &mut App) {
app.insert_resource(self.clone()) app.insert_resource(self.clone());
.add_systems(Startup, Self::handle_change_address) app.add_systems(Startup, Self::handle_change_address);
.add_systems( app.add_systems(
Update, Update,
( (
Self::handle_oauth.before(azalea::login::reply_to_custom_queries), Self::handle_oauth.before(azalea::login::reply_to_custom_queries),
@ -71,6 +71,11 @@ impl Plugin for ViaVersionPlugin {
.before(azalea::join::handle_start_join_server_event), .before(azalea::join::handle_start_join_server_event),
), ),
); );
app.remove_systems_in_set(
Update,
azalea::login::reply_to_custom_queries,
bevy_ecs::schedule::ScheduleCleanupPolicy::RemoveSystemsOnly,
);
} }
} }
@ -277,6 +282,21 @@ impl ViaVersionPlugin {
) { ) {
for event in events.read() { for event in events.read() {
if event.packet.identifier.to_string().as_str() != "oam:join" { if event.packet.identifier.to_string().as_str() != "oam:join" {
if event.disabled {
continue;
}
tracing::debug!(
"Replying to {} with generic response.",
event.packet.identifier
);
commands.trigger(SendLoginPacketEvent::new(
event.entity,
ServerboundCustomQueryAnswer {
transaction_id: event.packet.transaction_id,
data: None,
},
));
continue; continue;
} }