WorldEdit

WorldEdit

42M Downloads

Lurk for external commands from a file/ pipe/ unix domain socket (single player/ LAN host)

mk-pmb opened this issue ยท 1 comments

commented

The Problem

Hi! A lot of the commands I enter are very repetitive. Currently, I use xdotool to simulate keyboard chat input. It's rather inefficient since I need to assume worst case for the interaction delays. It also pollutes chat history, which I'd prefer to have reserved for the few commands that I actually type manually sometimes.

A Solution

WorldEdit could be configured a path inside the Minecraft directory where it would create (and re-create on deletion) a unix domain socket that accepts all connections and treats them like chat.
Since this feature is for somewhat advanced users, it would be acceptable to configure this via an environment variable or some obscure option to be manually inserted into some config file.
On systems that don't support unix domain sockets, or if user configures intentional downgrade, it could create (and re-create on deletion) a pipe and use that.
On systems that don't support pipes, or if user configures intentional downgrade, it could treat the path as a directory, monitor it for *.todo files, rename them to *.wip, run their commands, write results (if any) to .out and then rename the .wip to .done.

Alternatives

Any other high-speed text input channel that does not interfere with chat history is appreciated.
An easily script-readable channel for reading the response messages would be even nicer, then I could do stuff like check whether a selection already exists.

Anything Else?

Thanks a lot for WE!

commented

completely out of scope for worldedit. either run a server and use the console, or use some other mod/script/whatever to input commands or interact directly with the WE API.