Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is attempting to use the "idle" option doing anything? #12

Open
Xarius86 opened this issue Sep 16, 2023 · 3 comments
Open

Is attempting to use the "idle" option doing anything? #12

Xarius86 opened this issue Sep 16, 2023 · 3 comments

Comments

@Xarius86
Copy link

I have netcat installed, and I see the results of the script checking for online players routinely:

> list
[20:53:07 INFO]: [Essentials] CONSOLE issued server command: /list 
[20:53:07 INFO]: There are 0 out of maximum 100 players online.

But, at no point does the server actually seem to idle/turn off. It just keeps checking the online players every X minutes, and never actually stops.

I'm probably missing something simple here that is obvious to others?

I should point out I'm using Purpur with plugins rather than the vanilla jar...perhaps that's my problem?

@Edenhofer
Copy link
Owner

At least on my machine the idle server with the vanilla minecraft server is running just fine.

I think the problem might be purpur or the plugins. My concrete suspicion is that the idle server is not able to properly parse the output of the modified list command. Can you connect to the idle server session via sudo -u minecraft tmux -L minecraft attach -t idle_server_minecraft (replace the first minecraft with the user under which the game is running and the second minecraft with the session name configured in /etc/conf.d/...) and share the output?

@Xarius86
Copy link
Author

Xarius86 commented Sep 21, 2023

I end up seeing this line repeatedly when there are no active players:

no_player: 0s check_player_time: 30s idle_if_time: 300s

Quick edit: The 30sec check was put there just for this purpose. I obviously normally wouldn't be checking that often.

@Edenhofer
Copy link
Owner

Nice! Thanks for checking. This confirms my suspicion. The problem is this function here https://github.com/Edenhofer/minecraft-server/blob/703d029/minecraftd.sh.in#L88-L106 .

Would you be willing to have a stab at generalizing it to work with purpur/your plugins? In essence you would run the game_command line manually and then tweak the regex until it is encompasses you case too :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants