garrettjoecox / scriptserver

A Minecraft server wrapper, allows for simple plugins in vanilla
GNU General Public License v3.0
68 stars 10 forks source link

Separate server.start from other functions ? #35

Closed louislspn closed 3 years ago

louislspn commented 3 years ago

First of all, thank you for this repo, it's awesome !

However, is there a way to start the server on one side and then write / modify functions to do what I want with datas on an other side ? It seems that I need to restart the server every time to get the last version of my code because all functions are in the same file (server.js)

Thank you for your help !

Louis Lespinasse

garrettjoecox commented 3 years ago

This is an interesting thought, I will consider this in the upcoming re-write

garrettjoecox commented 3 years ago

To answer your question though, currently that is not possible, as the RCON connection waits to connect until ScriptServer has booted the server.

I might remove this limitation and just have it always attempting to connect..

garrettjoecox commented 3 years ago

Just pushed a major version update that might help solve this depending on your use case, if you are only using the RconConnection class, you can spin that process up and down at will without affecting a separate JavaServer instance, it will be a bit tricky communicating between the two though if that is a requirement.

Gonna close this for now, since I think that solution is about as close as I can get.