garrettjoecox / scriptserver

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

.send() is broken on Spigot servers #16

Closed garrettjoecox closed 6 years ago

garrettjoecox commented 6 years ago

The log message explaining the RCON listener is active differs from Spigot to vanilla (and potentially in other server implementations as well)

This prevents ScriptServer from connecting to RCON, therefor preventing .send() from being usable.

Proposed solutions:

ghost commented 6 years ago

Playing with the idea of removing cron all together, the minecraft server is spawned and maintained by node, any specific reason you chose RCON instead of just writing it directly?

this.spawn.stdin.write

garrettjoecox commented 6 years ago

This is actually how the initial implementation was done, for around a year. The biggest problem, which continuously caused issues in different ways was capturing the response of the sent command. It’s possible, but the solutions I was able to come up with all were brittle, had too many flaws, and depended too much on the server owner to really know what they were doing.

ImBaedin commented 6 years ago

Set up a list of common server software with their messages and check for those as well as continuously checking if it's open. It appears that SimpleRCON already has a timeout option, so it might be worth making that configurable from the user.

garrettjoecox commented 6 years ago

Yeah this is similar to the direction I've been working towards, but in a more generalized way so that all scriptserver modules can conform to it. Hopefully will have a PoC up soon.

garrettjoecox commented 6 years ago

This has been addressed in Commit 6fb0bc9b132b7a53f21ef942d01597ab80917fc3