11# PterodactylPowerAction
22
3- A Velocity plugin to start and stop servers using the [ Pterodactyl] ( https://pterodactyl.io/ ) client API.
3+ [ ![ GitHub CI] ( https://img.shields.io/github/actions/workflow/status/Pickaria/PterodactylPowerAction/.github%2Fworkflows%2Fpush.yml?branch=master )] ( https://github.com/Pickaria/PterodactylPowerAction/actions )
4+ [ ![ Latest Release] ( https://img.shields.io/github/v/release/Pickaria/PterodactylPowerAction )] ( https://github.com/Pickaria/PterodactylPowerAction/releases )
5+ [ ![ License] ( https://img.shields.io/github/license/Pickaria/PterodactylPowerAction )] ( LICENSE )
46
5- ## How it works
7+ A resource-saving Velocity plugin that automatically manages your Minecraft servers by starting them on demand and
8+ shutting them down when idle, using either the [ Pterodactyl] ( https://pterodactyl.io/ ) API or shell commands.
69
7- This plugin will stop a server after a given delay (1 hour by default) if it is empty after a player left or changed
8- server.
10+ ---
911
10- When a player tries to connect to a stopped server, they will be redirected to a waiting server such
11- as [ Limbo] ( https://www.spigotmc.org/resources/82468/ ) and will be automatically redirected to the requested server once
12- it is started.
12+ ## ✨ Key Features
1313
14- If the player is already connected on the network, they will simply be informed by a message that they will be
15- automatically redirected once the server is ready.
14+ - 🔌 ** Energy & Resource Saving ** - Automatically shuts down empty servers after a configurable idle period (default: 1
15+ hour)
1616
17- If the server fails to start, the player will be informed to try again.
17+ - 🚀 ** On-Demand Server Startup ** - Starts servers only when players need them, optimizing resource usage
1818
19- This plugin is also able to redirect your player that has been kicked from a backend server to the waiting server, this
20- is toggleable in the configuration file.
19+ - 🔄 ** Seamless Player Experience** :
20+ - Redirects players to a lightweight waiting server during startup
21+ - Automatically transfers players when their destination server is ready
22+ - Keeps players informed with status messages throughout the process
2123
22- ## Configuration
24+ - 🛡️ ** Kick Protection ** - Optionally redirects kicked players to your waiting server instead of disconnecting them
2325
24- The [ configuration guide] ( https://github.com/Pickaria/PterodactylPowerAction/wiki/Configuration-Guide ) is available on
25- the wiki.
26+ - 🧰 ** Flexible Implementation** :
27+ - Works with Pterodactyl Panel API for managed hosting
28+ - Supports direct shell commands for self-hosted environments
2629
27- ## In-game Commands
30+ - ⚙️ ** Highly Configurable** :
31+ - Customizable shutdown delay
32+ - Multiple server status checking methods
33+ - Configurable shutdown behavior on proxy restart
2834
29- The plugin's command require the player to have the ` pterodactylpoweraction.use ` permission.
35+ - 🌐 ** Multilingual Support** - Automatically translates messages based on the client's language (English, German,
36+ French)
3037
31- ### Reload Plugin Configuration
38+ - 🔍 ** Diagnostic Tools ** - Built-in doctor command to validate your configuration and troubleshoot issues
3239
33- To reload the plugin's configuration, use the following command:
40+ ## How it Works
3441
35- ``` plaintext
36- /pterodactylpoweraction reload
37- ```
42+ When a player tries to connect to a stopped server, they're temporarily sent to your waiting server while
43+ PterodactylPowerAction starts their requested destination. Once the server is ready, they're automatically transferred.
44+ The plugin monitors player activity and intelligently shuts down empty servers to save resources.
3845
39- > [ !NOTE]
40- > If you have added a new server to ` velocity.toml ` , you will need to reload this configuration as well.
41- > Currently, PterodactylPowerAction does not automatically reload Velocity's configuration, so you may require an
42- > additional plugin for this functionality.
46+ ![ server-is-starting.png] ( docs/assets/server-is-starting.png )
47+ _ Shader is Photon._
4348
44- ### Shutdown Empty Servers
49+ ---
4550
46- To manually shut down empty servers, use the following command:
51+ ## Documentation
4752
48- ``` plaintext
49- /pterodactylpoweraction clear [delay=0]
50- ```
53+ ### Configuration
5154
52- This will check the player count on all servers and send stop signals to all the empty servers after the given delay. If
53- not specified, the delay is 0 seconds by default.
55+ The [ configuration guide] ( docs/configuration.md ) is available in this document.
5456
55- ### Run Checks and Validate Configuration
57+ ### In-game Commands
5658
57- To run checks and validate the configuration, use the following command:
59+ The [ commands guide ] ( docs/commands.md ) is available in this document.
5860
59- ``` plaintext
60- /pterodactylpoweraction doctor
61- ```
62-
63- The ` doctor ` command is a tool for troubleshooting issues with your PterodactylPowerAction setup. It performs a
64- series of diagnostic checks to ensure that your configuration files are correctly set up and that all necessary
65- components are functioning properly. Running this command can help you identify and resolve potential problems.
66-
67- ## Localization
68-
69- The plugin's messages are automatically translated based on the client's language. Currently, the following languages
70- are supported:
71-
72- - German
73- - English
74- - French
61+ ---
7562
7663## Waiting/Limbo servers
7764
7865Here is a small list of recommended lightweights servers software to use as waiting server:
7966
80- - [ Limbo ] ( https://www.spigotmc.org/resources/82468/ )
67+ - [ PicoLimbo ] ( https://github.com/Pickaria/PterodactylPowerAction )
8168- [ NanoLimbo] ( https://www.spigotmc.org/resources/86198/ )
82-
83- I am also developing my own experimental [ PicoLimbo] ( https://github.com/Quozul/PicoLimbo ) server from scratch in Rust.
84- It has 0% CPU usage on idle and uses less than 10 MB of memory with minimal network footprint by only implementing the
85- required packets.
69+ - [ Limbo] ( https://www.spigotmc.org/resources/82468/ )
8670
8771Note that the waiting server does not have to be a limbo server specifically, it can be any server as long as it is
8872always accessible. If you have a dedicated lobby server in your network, you can use that, no need for a dedicated limbo
@@ -93,6 +77,8 @@ server!
9377I am running Minecraft servers on dedicated hardware at home, I wanted to save energy costs and memory usage by stopping
9478empty servers. Running the waiting server on a low power ARM Single Board Computer can also further save costs.
9579
80+ ---
81+
9682## Contributing
9783
9884Contributions are welcome! If you encounter any issues or have suggestions for improvement, please submit an issue or
0 commit comments