mirror of
https://github.com/NATroutter/egg-hytale.git
synced 2026-03-01 11:21:13 +03:00
Added Support for source query
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
"version": "PLCN_v3",
|
||||
"update_url": "https://cdn.nat.gg/egg/egg-hytale.pelican.json"
|
||||
},
|
||||
"exported_at": "2026-01-14T21:03:45+00:00",
|
||||
"exported_at": "2026-01-15T10:29:08+00:00",
|
||||
"name": "Hytale",
|
||||
"author": "contact@natroutter.fi",
|
||||
"uuid": "6594b287-2d7b-4249-bc93-4d40283c57e3",
|
||||
@@ -156,6 +156,18 @@
|
||||
],
|
||||
"sort": 6
|
||||
},
|
||||
{
|
||||
"name": "Enable Source Query Support",
|
||||
"description": "Adds the Source Query integration so your server can answer A2S queries such as server name, player count, and status.",
|
||||
"env_variable": "ENABLE_SOURCE_QUERY_SUPPORT",
|
||||
"default_value": "0",
|
||||
"user_viewable": true,
|
||||
"user_editable": true,
|
||||
"rules": [
|
||||
"boolean"
|
||||
],
|
||||
"sort": 22
|
||||
},
|
||||
{
|
||||
"name": "Event Debug",
|
||||
"description": "Enables detailed logging of server events for debugging purposes. Useful for troubleshooting issues or tracking event behavior, but may produce a lot of output.",
|
||||
@@ -272,6 +284,20 @@
|
||||
],
|
||||
"sort": 12
|
||||
},
|
||||
{
|
||||
"name": "Source Query Listening Port",
|
||||
"description": "Specifies the port used by the Source Query service to handle A2S requests. This must be separate from the main game port. By default, it is set to the game port plus one.",
|
||||
"env_variable": "QUERY_PORT",
|
||||
"default_value": "5021",
|
||||
"user_viewable": true,
|
||||
"user_editable": true,
|
||||
"rules": [
|
||||
"integer",
|
||||
"between:1,65535",
|
||||
"required"
|
||||
],
|
||||
"sort": 23
|
||||
},
|
||||
{
|
||||
"name": "Validate Assets",
|
||||
"description": "Causes the server to exit with an error code if assets are invalid. Leave empty to skip validation.",
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
"version": "PTDL_v2",
|
||||
"update_url": "https:\/\/raw.githubusercontent.com\/NATroutter\/egg-hytale\/refs\/heads\/main\/egg-hytale.pterodactyl.json"
|
||||
},
|
||||
"exported_at": "2026-01-14T23:02:09+02:00",
|
||||
"exported_at": "2026-01-15T12:29:34+02:00",
|
||||
"name": "Hytale",
|
||||
"author": "contact@natroutter.fi",
|
||||
"description": "Hytale is a block-based sandbox game that blends creative building with RPG adventure. Explore procedurally generated worlds filled with unique biomes, dungeons, and creatures. Build anything from simple homes to grand castles, craft items, and battle monsters. Create custom content with built-in modding tools, host your own servers, and shape the experience with plugins and mods. Play solo or with friends in a world designed for both creation and exploration.\r\n\r\nCredits:\r\n- Made by NATroutter\r\n- https:\/\/natroutter.fi\r\n- https:\/\/github.com\/NATroutter",
|
||||
@@ -239,6 +239,26 @@
|
||||
"user_editable": true,
|
||||
"rules": "required|boolean",
|
||||
"field_type": "text"
|
||||
},
|
||||
{
|
||||
"name": "Enable Source Query Support",
|
||||
"description": "Adds the Source Query integration so your server can answer A2S queries such as server name, player count, and status.",
|
||||
"env_variable": "ENABLE_SOURCE_QUERY_SUPPORT",
|
||||
"default_value": "0",
|
||||
"user_viewable": true,
|
||||
"user_editable": true,
|
||||
"rules": "required|boolean",
|
||||
"field_type": "text"
|
||||
},
|
||||
{
|
||||
"name": "Source Query Listening Port",
|
||||
"description": "Specifies the port used by the Source Query service to handle A2S requests. This must be separate from the main game port. By default, it is set to the game port plus one.",
|
||||
"env_variable": "QUERY_PORT",
|
||||
"default_value": "5021",
|
||||
"user_viewable": true,
|
||||
"user_editable": true,
|
||||
"rules": "required|integer|between:1,65535",
|
||||
"field_type": "text"
|
||||
}
|
||||
]
|
||||
}
|
||||
26
entry.sh
26
entry.sh
@@ -432,6 +432,32 @@ if [ ! -f "HytaleServer.jar" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Download the latest hytale-sourcequery plugin if enabled
|
||||
if [ "${ENABLE_SOURCE_QUERY_SUPPORT}" = "1" ]; then
|
||||
echo "Source Query support enabled, checking for plugin..."
|
||||
|
||||
# Create mods directory if it doesn't exist
|
||||
if [ ! -d "mods" ]; then
|
||||
echo "Creating mods directory..."
|
||||
mkdir -p mods
|
||||
fi
|
||||
|
||||
echo "Downloading latest hytale-sourcequery plugin..."
|
||||
LATEST_URL=$(curl -sSL https://api.github.com/repos/physgun-com/hytale-sourcequery/releases/latest | jq -r '.assets[0].browser_download_url // empty')
|
||||
|
||||
if [ -n "$LATEST_URL" ]; then
|
||||
curl -sSL -o mods/hytale-sourcequery.jar "$LATEST_URL"
|
||||
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "✓ Successfully downloaded hytale-sourcequery plugin to mods folder"
|
||||
else
|
||||
echo "⨯ Failed to download hytale-sourcequery plugin"
|
||||
fi
|
||||
else
|
||||
echo "⨯ Could not find hytale-sourcequery plugin download URL"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Check for cached authentication tokens
|
||||
if check_cached_tokens && load_cached_tokens; then
|
||||
echo "Using cached authentication..."
|
||||
|
||||
Reference in New Issue
Block a user