Mineos_console.js documentation?

Is there any documentation for mineos_console.js? Right now I’m looking for a way to send commands to the server console. In the future I expect to use other mineos commands too.

Reading the wiki, I see that the python mineos had a “console” command that would do that. Reading mineos.js, the closest thing I see is “stuff”, which looks like it’s more low-level. It seems to execute the command fine, but also dumps pages of output from the spawn process command.

Is this the right way to do it? Is there a better way?

Still waiting for an answer to this.

No, there’s no real documentation…pretty much any command that you see in mineos.js is what you can use for mineos_console.js (just as with Python).

For example, you might see: self.modify_sp in mineos.js:

self.modify_sp = function(property, new_value, callback) {

which means you’ll construct the command like this:

./mineos_console.js -s myserver modify_sp difficulty 1

Or you might want to use… self.accept_eula:

self.accept_eula = function(callback) {

which means you’ll construct your command line like:

./mineos_console.js -s myserver accept_eula

Or other examples:

./mineos_console.js -s myserver start
./mineos_console.js -s myserver kill
./mineos_console.js -s myserver stuff "hello everybody here!"

Etc etc. callback isn’t something you provide an argument for, so when you get to that argument in the function definition, you merely omit it.

1 Like

How would I send a command to a server from CLI? With the old python version of mineos there was a command called “console” that would allow you to pass parameters along to the specified server console, but this seems to be missing in the js-node version (I looked through the mineos.js file and didn’t see it). You can pass commands to a server via the webui, so i would imagine that it is possible for you to call the same function via CLI. How do? :stuck_out_tongue:

I’m sorry about this one: it’s called stuff, based on what functionality it’s leveraging from screen.

mineos-node/mineos.js at master · hexparrot/mineos-node · GitHub

1 Like

Can you give an example of how to use ‘stuff’ to run a Minecraft command like say or seed?

./mineos_console.js -s myserver stuff "say hello"

1 Like