kgb26
kgb26

Reputation: 183

Minecraft Server Executing Scripts

I am working on a minecraft world space that can interact with a terminal shell and run commands on the computer directly. I intend to use not just the vanilla server but maybe craftbukkit or spigot.

Is it possible to create a listener on minecraft server.jar and wait for a certain command which executes a script on the computer itself?

Is there a plugin out there made for this purpose?

Upvotes: 1

Views: 1044

Answers (1)

Erik
Erik

Reputation: 108

You can create a new plugin for Bukkit/Spigot (more information here).

In the onCommand-Method you can then call Runtime.getRuntime().exec("your shell command") to run commands in the linux shell (can also be used on Windows servers).

See also the Java documentation.

Upvotes: 2

Related Questions