6 Commits

Author SHA1 Message Date
c3d1618ba8 Update status schema to string for >=1.20.4
thx lahvuun -- https://github.com/timvisee/lazymc/issues/57#issuecomment-1858879744
2024-02-17 00:57:20 -07:00
Tim Visée
37fdb9c12a Merge pull request #54 from Spongecade/patch-1
Update Minecraft wiki links to new domain
2023-10-13 18:53:23 +02:00
Spongecade
e7a3db19aa Update Minecraft wiki links to new domain 2023-10-05 15:26:24 -05:00
timvisee
ca4753673d Run CI on shared GitLab runners 2023-08-20 17:33:32 +02:00
timvisee
0124aa723d Merge branch 'Xeyler-master' into master
Refs: https://github.com/timvisee/lazymc/pull/50
2023-05-30 22:41:04 +02:00
Xeyler
afbc54758c Update monitor.rs 2023-05-27 23:14:48 -06:00
5 changed files with 7 additions and 12 deletions

View File

@@ -7,11 +7,6 @@ stages:
- pre-release
- release
default:
tags:
- linux
- timvisee-linux
# Variable defaults
variables:
RUST_VERSION: stable

View File

@@ -50,7 +50,7 @@ dotenv = "0.15"
flate2 = { version = "1.0", default-features = false, features = ["default"] }
futures = { version = "0.3", default-features = false, features = ["executor"] }
log = "0.4"
minecraft-protocol = { git = "https://github.com/timvisee/rust-minecraft-protocol", rev = "edfdf87" }
minecraft-protocol = { git = "https://git.cozy.software/slime/rust-minecraft-protocol", rev = "4d9c0d4305" }
named-binary-tag = "0.6"
nix = "0.26"
notify = "4.0"

View File

@@ -57,13 +57,13 @@ pub async fn monitor_server(config: Arc<Config>, server: Arc<Server>) {
// Sleep server when it's bedtime
if server.should_sleep(&config).await {
info!(target: "lazymc::montior", "Server has been idle, sleeping...");
info!(target: "lazymc::monitor", "Server has been idle, sleeping...");
server.stop(&config).await;
}
// Check whether we should force kill server
if server.should_kill().await {
error!(target: "lazymc::montior", "Force killing server, took too long to start or stop");
error!(target: "lazymc::monitor", "Force killing server, took too long to start or stop");
if !server.force_kill().await {
warn!(target: "lazymc", "Failed to force kill server");
}

View File

@@ -70,7 +70,7 @@ async fn send_v1_16_3(
packet::write_packet(
Title {
action: if title.is_empty() && subtitle.is_empty() {
// Defaults: https://minecraft.fandom.com/wiki/Commands/title#Detail
// Defaults: https://minecraft.wiki/w/Commands/title#Detail
TitleAction::SetTimesAndDisplay {
fade_in: 10,
stay: 70,
@@ -121,7 +121,7 @@ async fn send_v1_17(
// Set title times
packet::write_packet(
if title.is_empty() && subtitle.is_empty() {
// Defaults: https://minecraft.fandom.com/wiki/Commands/title#Detail
// Defaults: https://minecraft.wiki/w/Commands/title#Detail
SetTitleTimes {
fade_in: 10,
stay: 70,

View File

@@ -232,11 +232,11 @@ async fn server_status(client_info: &ClientInfo, config: &Config, server: &Serve
if config.motd.from_server && status.is_some() {
status.as_ref().unwrap().description.clone()
} else {
Message::new(Payload::text(match server_state {
match server_state {
server::State::Stopped | server::State::Started => &config.motd.sleeping,
server::State::Starting => &config.motd.starting,
server::State::Stopping => &config.motd.stopping,
}))
}.to_string()
}
};