vincss / mcsleepingserverstarter

Put your minecraft server to rest, while SleepingServerStarter is watching !
https://www.spigotmc.org/threads/put-your-server-to-rest-with-sleepingserverstarter.108828/
252 stars 47 forks source link

Disable the web-api when server has started #90

Closed beastksoepic closed 2 years ago

beastksoepic commented 2 years ago

Hey! I have an issue with the web-api. Basically, I have a server where players would startup the server through the web-api, but they kept spamming even if the server has already started.

I know this is meant for server owners that use dynmap, but keep in mind it takes some time for the server to start, and people still abuse it in that short amount of time where the server is starting up and dynmap hasn't loaded yet.

beastksoepic commented 2 years ago

The issue with spamming the web-api is that it causes a message to appear in the console. I'm not sure if this is a problem with the pterodactyl console or the script itself, but it would break the console in my case.

cicatrice74 commented 2 years ago

Are you able to use this on pterodactyl panel system ?

beastksoepic commented 2 years ago

Yep, just with a bit of configuration and using a custom ptero egg

vincss commented 2 years ago

This issue make your pterodactyl crash ? Can you explain how you set it up so I can reproduce ?

beastksoepic commented 2 years ago

It did not, but it did however crash the server. To reproduce this, simply enable the web api, then send in one request to start up the server. After a few moments, send another request and it would send a message and the console would stop working.

vincss commented 2 years ago

I know that the webserver on a windows system doesn't work very well with console redirection. I added a parameter to disable the webServer when the minecraft server is running : webStopOnStart . Can you give it a try ? Branch: feature/add_webStopOnStart https://github.com/vincss/mcsleepingserverstarter/pull/92 Binary : https://github.com/vincss/mcsleepingserverstarter/actions/runs/2188697493

vincss commented 2 years ago

Hi, Did you give it a try ?

beastksoepic commented 2 years ago

Sorry, I've been most busy in school, recently the pterodactyl instance I was running this on had some issues, can I try it with a fresh brand new pterodactyl instance?

vincss commented 2 years ago

Yes, of course, I don't know anything about this pterodactyl thing.

Timongcraft commented 2 years ago

Yep, just with a bit of configuration and using a custom ptero egg

Can you send me the egg? I also want to use it on my own pterodactyl panel.

beastksoepic commented 2 years ago

Can you send me the egg? I also want to use it on my own pterodactyl panel.

I would love to send it to you, but unfortunately it's a proprietary egg, and it exists on my old webserver which I don't have access to atm.

Timongcraft commented 2 years ago

Ok, if you can pls send it to me that qould realy help me but it is clear that you cant do it now. (I can wait some weeks)

Timongcraft commented 2 years ago

How long do you thing I have to wait?