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,18 +59,23 @@ pub struct ViaVersionPlugin {
impl Plugin for ViaVersionPlugin {
fn build(&self, app: &mut App) {
app.insert_resource(self.clone())
.add_systems(Startup, Self::handle_change_address)
.add_systems(
Update,
(
Self::handle_oauth.before(azalea::login::reply_to_custom_queries),
Self::poll_all_oam_join_tasks,
Self::warn_about_proxy
.after(azalea::auto_reconnect::rejoin_after_delay)
.before(azalea::join::handle_start_join_server_event),
),
);
app.insert_resource(self.clone());
app.add_systems(Startup, Self::handle_change_address);
app.add_systems(
Update,
(
Self::handle_oauth.before(azalea::login::reply_to_custom_queries),
Self::poll_all_oam_join_tasks,
Self::warn_about_proxy
.after(azalea::auto_reconnect::rejoin_after_delay)
.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() {
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;
}