VelocityWakeUp

插件

· 作者 yarchesun

当玩家尝试连接时,自动启动你的后端服务器

0 本站下载 0 关注 更新于 5 个月前

最新 1.1.1 · 26.2 · Velocity

一键开服(送7天)

VelocityWakeUp

EN: 当玩家尝试连接时自动启动后端服务器——无需再手动开启。 灵感来源于 silvervoid 的 ServerAlarmClock。由于原版仅支持 Bungeecord,此插件将这一理念原生移植至 Velocity。

与 ServerSleepingPill 配合使用效果极佳——让它负责让服务器休眠,VelocityWakeUp 则按需将其唤醒。

工作原理: 当玩家连接到离线服务器时,插件会创建一个标志文件。你的启动脚本检测到该文件后启动服务器。一旦服务器上线,玩家便自动接入。

RU: Автоматически запускает ваши бэкенд-серверы, когда игрок пытается подключиться - больше не нужно запускать их вручную. Создан по мотивам ServerAlarmClock от silvervoid. Поскольку оригинал поддерживает только Bungeecord, этот плагин реализует ту же идею непосредственно в Velocity.

Отлично работает в сочетании с ServerSleepingPill - пусть он переводит серверы в спящий режим, а VelocityWakeUp разбудит их по требованию.

Как это работает: Когда игрок подключается к офлайн-серверу, плагин создает файл-флаг. Ваш скрипт запуска обнаруживает его и запускает сервер. Как только сервер становится онлайн, игрок подключается автоматически.

Made with claude.ai

用于重启配置的命令
/wakeup reload
config.yml
# VelocityWakeUp v1.1.1
# Automatically starts backend servers when a player tries to connect.
#
# The key under 'servers' must exactly match the server name in velocity.toml.
#
# flag-file: path to a file your startup script monitors.
#   The plugin CREATES this file when a player connects to an offline server.
#   Your script detects it, starts the server, then the plugin connects the player.

messages:
  starting: "&eThe server is waking up, please wait..."
  failed:   "&cCould not signal server start. Contact an admin."
  timeout:  "&cServer took too long to start. Try again later."
  # Message shown when player successfully cancels the wait
  cancelled: "&aYou have cancelled waiting for the server."
  # Text of the clickable [Cancel] button appended to the starting message
  # Supports & color codes
  cancel-button: "&c[Cancel]"
  # Hover tooltip shown on the cancel button
  cancel-button-hover: "&7Click to cancel waiting and return to the hub."

timing:
  startup-timeout-seconds: 60
  message-interval-seconds: 5

cancel:
  # Whether the cancel button is shown at all
  enabled: true
  # Command executed when the player clicks the cancel button.
  # Use {player} placeholder for the player's name.
  # Leave empty ("") to run no command.
  # Examples:
  #   "server hub"        — send player to hub (runs as player via /server)
  #   "kick {player} Cancelled waiting" — kick via console command
  #   "warp spawn"        — run any proxy/backend command as the player
  command: "server hub"
  # Who runs the command:
  # "player"  — Velocity proxy executes the command on behalf of the player.
  #             Use this for PROXY-level commands (e.g. "server hub").
  # "console" — Velocity proxy console executes the command.
  #             Use this for proxy console commands (e.g. "kick {player} ...").
  # "backend" — The command is sent to the backend server where the player
  #             currently is, as if the player typed it in chat.
  #             Use this for BACKEND (Paper/Spigot/etc.) commands (e.g. "restorepack", "spawn").
  executor: "player"

servers:
  # Example — replace with your actual server name from velocity.toml
  survival:
    flag-file: "D:/mc/survival/start.flag"
启动命令示例
@echo off
chcp 65001 > nul
set FLAG_FILE=C:\YOUR DIRECTORY HERE\start.flag

cd /d C:\YOUR DIRECTORY HERE

:loop
if exist "%FLAG_FILE%" (
    del /f "%FLAG_FILE%"
    STARTUP COMMAND HERE
)
ping -n 3 127.0.0.1 > nul
goto loop

你是这个资源的作者?登录后可认领此资源。

评论 0

0.0
暂无评分
5 星
0
4 星
0
3 星
0
2 星
0
1 星
0
我的评分

登录后参与评分

还没有评论,来抢沙发吧

评论配图

相似资源