Add some info output

This commit is contained in:
Leonard Steppy 2025-12-23 13:30:30 +01:00
parent 4f710e80be
commit b9e82b96e3

View File

@ -7,7 +7,7 @@ STANDALONE_PORT=25565
# port of the server in proxy mode, aka the internal port # port of the server in proxy mode, aka the internal port
PROXY_PORT=25566 PROXY_PORT=25566
# installs ViaVersion on BungeeCord and standalone mode, removes it in Velocity mode # installs ViaVersion on BungeeCord and standalone mode, removes it in Velocity mode
MANAGE_VIA_VERSION=true MANAGE_VIA_VERSION=false
# installs ViaBackwards on BungeeCord and standalone mode, removes it in Velocity mode # installs ViaBackwards on BungeeCord and standalone mode, removes it in Velocity mode
MANAGE_VIA_BACKWARDS=$MANAGE_VIA_VERSION MANAGE_VIA_BACKWARDS=$MANAGE_VIA_VERSION
@ -102,6 +102,7 @@ function main {
# Velocity # Velocity
if $velocity; then if $velocity; then
info "Configuring for Velocity"
enable_online_mode false enable_online_mode false
set_port "$PROXY_PORT" set_port "$PROXY_PORT"
enable_velocity true enable_velocity true
@ -115,6 +116,7 @@ function main {
# BungeeCord # BungeeCord
elif $bungeecord; then elif $bungeecord; then
info "Configuring for BungeeCord"
enable_online_mode false enable_online_mode false
set_port "$PROXY_PORT" set_port "$PROXY_PORT"
enable_velocity false enable_velocity false
@ -128,6 +130,7 @@ function main {
# standalone # standalone
elif $standalone; then elif $standalone; then
info "Configuring for standalone mode"
enable_online_mode true enable_online_mode true
set_port "$STANDALONE_PORT" set_port "$STANDALONE_PORT"
enable_velocity false enable_velocity false
@ -185,6 +188,7 @@ function update_plugin {
local plugin_name=$1 local plugin_name=$1
local repo=$2 local repo=$2
remove_plugin $plugin_name remove_plugin $plugin_name
info "Downloading latest version of $plugin_name..."
download_jar_from_github $repo "plugins/" download_jar_from_github $repo "plugins/"
} }
@ -202,6 +206,15 @@ function download_jar_from_github {
fi fi
} }
# Print something unless quiet flag has been set
#
# Usage: info <msg>
function info {
if ! $quiet; then
echo "$1"
fi
}
# Shows ans error message and exits the program with code 1 # Shows ans error message and exits the program with code 1
# #
# Usage: err <msg> # Usage: err <msg>