Minecraft BukkitCLI mod 2026 download
logo
minecraft mod BukkitCLI

BukkitCLI

Game Version: CB 1.7.9-R0.1
Total Downloads: 371
Updated: May 29, 2014
Created: May 24, 2014
Download BukkitCLIDownload Earlier Versions

Earlier Versions

Name Size Uploaded Game Version Downloads
v1.0 release 7.24 KB May 29, 2014 CB 1.7.9-R0.1 280 download BukkitCLI v1.0 releaseDownload
v0.1 alpha 6.74 KB May 25, 2014 CB 1.7.9-R0.1 91 download BukkitCLI v0.1 alphaDownload

Description

Share this:

With BukkitCLI you can define and execute commands on the servers command line. With a CallbackHandler you can handle possible output. It will work as an API for other plugins to use and may support native ways of command triggering.

You need to be in control of the server minecraft is running on. This plugin wont wont work if you have no rights on the underlying server.

I recommend to group commands into little scripts and execute them instead of complex commands via BukkitCLI. You can run commands through bash but JavaRuntime does not do this by default. See examples for more information.

Links

  • Source on Github
  • Javadoc

Use Cases

  • Run an external backup script
  • Check availability of a service
  • Create a control room for your server for fun

Usage

  • Include BukkitCLI.jar in your build path
  • Import de.wrenchbox.cli.BukkitCLI in your class
  • Use one of the BukkitCLI.createJob() methods to schedule a job

Info

  • The job manager will queue all jobs and run them one after another according to FIFO principle.
  • You can define the working directory of a job
  • You can pass a callback handler to handle exit code, output and errors resulting from your command

Road Map

  • Native support for defining commands in addition to the API functionality
  • Permissions

Examples

package de.wrenchbox.test;

import org.bukkit.plugin.java.JavaPlugin;

import de.wrenchbox.cli.BukkitCLI;
import de.wrenchbox.cli.jobs.CallbackHandler;

public class TestPlugin extends JavaPlugin {
  
  @Override
  public void onEnable() {
    if (!getDataFolder().exists()) {
      getDataFolder().mkdirs();
    }

    // print the current working directory. should be the server root
    // [13:24:21 INFO]: [TestPlugin] Current directory: /home/amshaegar/workspace/Minecraft
    BukkitCLI.createJob("pwd", new CallbackHandler() {
      
      @Override
      public void execute(int exitCode, String out, String err) {
        getLogger().info(String.format("Current directory: %s", out));
      }
    });
    
    // create a file 'last_run' in the plugin directory
    // plugins/TestPlugin/last_run
    BukkitCLI.createJob("touch last_run", getDataFolder());
    
    // print the system date and time
    // [13:24:21 INFO]: [TestPlugin] System time: So 25. Mai 13:24:21 CEST 2014
    BukkitCLI.createJob("date", getDataFolder(), new CallbackHandler() {
      
      @Override
      public void execute(int exitCode, String out, String err) {
        if (exitCode == 0) {
          getLogger().info(String.format("System time: %s", out));
        } else {
          getLogger().warning(err);
        }
      }
    });
  }

}

Comments

Add a comment