Dynamic PTerodactyl
用于按需启动 Minecraft 容器的 Velocity 插件!
功能:
- 启动/停止 Pterodactyl 容器(托管 Minecraft)
- 在容器启动后,将玩家发送(或提示他们前往)到新的服务器
非常适合那些不希望 24/7 全天候运行服务器的社区(例如:小游戏服务器)
演示
关于安全性
建议你在面板中创建一个专用用户来为本插件的 API 密钥服务!你只需要在该用户的权限设置中,针对特定服务器授予 START、STOP 和 RESTART 权限即可。
这并非插件功能上的限制,但始终建议限制 API 密钥的权限范围,以最大程度降低滥用风险。
参见:

配置
请参见以下示例:
api-url: "https://panel.example.com"
api-key: "apiKeyHere"
default-timeout: 120 # 服务器看门狗检查服务器是否为空且在线的时间间隔。
startup-timeout: 120 # 插件在请求失败前愿意等待服务器启动的最长时间。
servers:
survival-example: # 此名称必须与 `velocity.toml` 中的 `servers` 部分匹配
display-name: Survival 2 # 此处可以使用 minimessage 格式!
uuid: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
watchdog: true # 设置为 false 或省略此项以完全禁用在看门狗。
timeout: 120 # 看门狗超时时间(秒)(默认值:120s)
注意,使用 /dpt reload 命令 不会 更改 api-url / api-key,你必须重启代理才能生效。
命令
/dptsend <player/all/current> <server> <promptPlayersToJoin/promptMeToSend>
- player:向指定玩家发送指令
- all:将所有代理服务器上的玩家发送到目标服务器
- current:调用者必须是玩家。将当前所在服务器的所有玩家发送到目标服务器。
- promptPlayersToJoin:当服务器就绪时,向所有玩家发送一条邀请消息,引导他们加入服务器。
- promptMeToSend:当服务器就绪时,发送一条交互式消息,点击即可将所有玩家发送过去。
/dptsend server <origin server> <destination server> <promptPlayersToJoin/promptMeToSend>
- origin server:任意 Velocity 服务器。
- destination server:任何 dpt 配置控制的 Velocity 服务器。
- promptPlayersToJoin:当服务器就绪时,向所有玩家发送一条邀请消息,引导他们加入服务器。
- promptMeToSend:当服务器就绪时,发送一条交互式消息,点击即可将所有玩家发送过去。
/dptserver <destination server> <immediate>
- destination server:任何 dpt 配置控制的 Velocity 服务器
- immediate:
dptserver 的默认行为是在服务器就绪时进行提示。指定此选项将在服务器就绪后立即发送玩家。
/dptping <server>
- server:任何 dpt 配置控制的 Velocity 服务器
/dptwd <server> <start/stop>
- server:任何 dpt 配置控制的 Velocity 服务器
权限:
dpt.send 访问 /dptserver <destination server>。理想情况下应将此权限授予用户(加上特定的服务器权限)
dpt.send.others 发送代理/服务器上的其他玩家(/dptsend <player> <destination>)
dpt.send.all 发送代理/服务器上的所有玩家(/dptsend <all/current> <destination>)
dpt.send.<server-name> 允许执行 /dptserver <server-name> 和 /dptsend <player/all/current> <server-name>,其中 server-name 是已配置好的服务器名称。
dpt.send.anywhere 上述权限,但适用于任意服务器。
dpt.ping 对服务器进行 Ping 测试。
dpt.watchdog 访问 /dptwd 命令
许可证
采用 Apache 2.0 许可证授权。
Logo Image By "annaxphiline"
Dynamic PTerodactyl
Velocity plugin for on-demand minecraft containers!
Features:
- Start/Stop a Pterodactyl Container (hosting Minecraft)
- Send player(s) to the new servers once it has started (or prompt them to do so)
Ideal for communities with servers you don't want to run 24/7 (i.e.: For minigame servers)
Demo
A word on security
I would advise that you make a specific user in your panel to use for your API keys for this! You only need to give this user 'START', 'STOP' and 'RESTART' permissions on a server by server basis.
This is not a matter of plugin functionality but it is always advisable to restrict what your API keys can do to restrict the potential for abuse.
See:

Config
See the following example:
api-url: "https://panel.example.com"
api-key: "apiKeyHere"
default-timeout: 120 # interval between times server's watchdog will check if its empty & online.
startup-timeout: 120 # how long the plugin is willing to wait for a server to start before failing a request.
servers:
survival-example: # this must match the `servers` section of `velocity.toml`
display-name: Survival 2 # This can use minimessage!
uuid: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
watchdog: true # set to false or omit to disable watchdog entirely.
timeout: 120 # watchdog timeout in seconds (default: 120s)
Note that using /dpt reload will not change api-url/api-key, you must restart the proxy in order to do this.
Commands
/dptsend <player/all/current> <server> <promptPlayersToJoin/promptMeToSend>
- player: send player to server
- all: send all players on the proxy to server
- current: CALLER MUST BE A PLAYER. send all players on current server to server.
- promptPlayersToJoin: send a message to all players when the server is ready inviting them to the server.
- promptMeToSend: send an interactive message when the server is ready that sends all the players on click.
/dptsend server <origin server> <destination server> <promptPlayersToJoin/promptMeToSend>
- origin server: any velocity server.
- destination server: any velocity server dpt is configured to control.
- promptPlayersToJoin: send a message to all players when the server is ready inviting them to the server.
- promptMeToSend: send an interactive message when the server is ready that sends all the players on click.
/dptserver <destination server> <immediate>
- destination server: any velocity server dpt is configured to control
- immediate:
dptserver default behaviour should be to prompt when the server is ready. specifying this option will send the player as soon as the servers ready.
/dptping <server>
- server: any velocity server dpt is configured to control
/dptwd <server> <start/stop>
- server: any velocity server dpt is configured to control
Permissions:
dpt.send Access to /dptserver <destination server>. Give this permission to users ideally (plus specific server permissions)
dpt.send.others Send other players on proxy/server (/dptsend <player> <destination>)
dpt.send.all Send all players on proxy/server (/dptsend <all/current> <destination>)
dpt.send.<server-name> Access to do /dptserver <server-name> and /dptsend <player/all/current> <server-name> where server-name is already configured.
dpt.send.anywhere Above permission but for any server.
dpt.ping Ping a server.
dpt.watchdog Access to /dptwd
License
Licensed under Apache 2.0.
Logo Image By "annaxphiline"
评论 0
登录后参与评分
还没有评论,来抢沙发吧