Skip to content

Commit

Permalink
0.8.4 - Zenith Auto Disconnect
Browse files Browse the repository at this point in the history
  • Loading branch information
ShayBox committed Nov 29, 2024
1 parent 81538ce commit 042e204
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "shaysbot"
version = "0.8.3"
version = "0.8.4"
authors = ["Shayne Hartford <shaybox@shaybox.com>"]
edition = "2021"
description = "My personal Minecraft bot using Azalea"
Expand Down
3 changes: 2 additions & 1 deletion src/plugins/auto_exit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ pub fn handle_auto_exit_disconnect_event(
mut events: EventReader<DisconnectEvent>,
mut query: Query<&GameProfileComponent>,
swarm_state: Res<SwarmState>,
settings: Res<Settings>,
) {
for event in events.read() {
let Ok(game_profile) = query.get_mut(event.entity) else {
Expand All @@ -43,7 +44,7 @@ pub fn handle_auto_exit_disconnect_event(
continue;
};

if reason.to_string().starts_with("AutoDisconnect") {
if settings.zenith_auto_disconnect && reason.to_string().starts_with("AutoDisconnect") {
info!("[AutoReconnect] Disabled for {}", game_profile.name);
swarm_state
.auto_reconnect
Expand Down
4 changes: 4 additions & 0 deletions src/settings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ pub struct Settings {
#[default(false)]
pub unknown_player_auto_exit: bool,

/// Automatically disconnect and exit Zenith Proxy disconnects the bot.
#[default(false)]
pub zenith_auto_disconnect: bool,

/// Disable in-game commands for non-whitelisted players.
#[default(false)]
pub whitelist: bool,
Expand Down

0 comments on commit 042e204

Please sign in to comment.