[ADMIN][TOOL][REMOTE][SCRIPTING] Simple Bukkit Wrapper v1.4 [FREE]

Discussion in 'Bukkit Tools' started by connorcpu, Oct 19, 2011.

Thread Status:
Not open for further replies.
  1. Offline

    connorcpu

    Simple Bukkit Wrapper
    by Connorcpu

    NOTE: There havn't been any recent major updates because I'm working on a new version of the wrapper which should have a better, more efficient interface, and hopefully a system to make the scripting/scheduling easier.

    Description
    I have been working on a project I call "Simple Bukkit Wrapper", and while still a work in progress, it is 100% functional at this time and I use it on my own server!. It is just a basic GUI coded in C#/.NET 4.0 and does many things for you, aswell as getting that ugly console out of your face and in the task tray! I believe this program to be perfect for a small private server of a few people who don't want to mess around with installing a bukkit server by hand.

    Features
    - Automatically detects the location of Java on the first run if it is in one of 4 common locations, otherwise it will ask you to point it out with a standart file open dialog.
    - Automatically updates on launch to the latest version, and its size of <1MB makes this very quick (Option to skip update)
    - Has menu options to get to the server config and plugins folder
    - Automatically downloads the latest RB of bukkit on the first run and has a menu option to download the latest RB later on.
    - Option to automatically save the map and restart the server on a defined interval.
    - Ability to hide the window to the task tray!
    - Send server commands through a raw TCP client such as PuTTY
    - I have created a lightweight java client that can connect to it.
    Find it here
    - Fully scriptable interface to modify behaviour

    Todo
    - Add ability to change file location

    Requirements
    - Windows XP, Server 2003, Vista, Server 2008, Server 2008R2, or Windows 7
    - Microsoft .Net Framework version 4.0 Client Profile or Full
    - Windows Installer 3.1

    Download
    Latest version
    Source

    Screenshots (open)

    The server after pressing start. You can see all the same data you would see from a standard minecraft console, but in a cleaner window with management options.
    [​IMG]

    The server icon minimized to the system tray
    [​IMG]

    Issues (open)

    - Only one instance of minecraft server files are kept per computer. Working on change to automatically migrate files to a per-user directory.

    Scripting (open)

    Super class overview (open)

    Helper commands
    - start()
    Starts the server if it is down
    - stop()
    Sends the stop command, equivalent of:
    command("save-all");
    command("stop");
    - restart(bool wait)
    parameter is optional
    Stops the server, waits for it to finish, then starts it again
    if parameter "wait" is true, the command will not return until the server is running again
    - command(string command)
    Sends the parameter "command" to the server as if it was typed in the console
    - server_running()
    Returns whether the server is running (bool)
    - get_file_root()
    Returns the path describing where the server_files folder is located (string)
    Notes: use Path.Combine(get_file_root(), "server_files\\plugins") to get the plugins folder
    - downloadstring(string url)
    Returns the string representation of the provided URL
    Notes: will block the thread until download has finished
    - downloadfile(string url, string path, bool relative)
    Downloads the file at the specified url to the specified path.
    relative parameter says whether the path should be relative to server_files directory
    - shell_command(string command)
    Executes a command in cmd.exe
    - run_program(string path, string args)
    Executes a program at the path with the specified arguments

    Overridable methods
    - public override void load() { }
    Executed whenever the script module is loaded (at server start or pressing Save on the script editor)
    - public override void unload() { }
    Occurs when the script is unloaded to allow a new version to be loaded
    - public override void serverstart() { }
    Occurs whenever the server starts (careful about infinite loops)
    - public override void tick(ref System.TimeSpan time) { }
    Occurs once every minute and provides a referenced TimeSpan to help keeping track
    - public override void macro(string macro) { }
    Occurs when a macro is called from the GUI
    Parameter macro is the string specified
    - public override bool remote_command(string cmd) { }
    Occurs whenever a remote client sends a command
    Return whether you want command execution to stop in the default parser

    Snipets
    Restart with style
    Code:
    public override bool remote_command(string cmd, System.Net.EndPoint ip)
    {
      // Make sure the command is #restart
      if (cmd.StartsWith("#restart")){
        // Send the compat plugin's kickall command with some colored text
        command("sbw_kickall §aServer restarting...");
        // Wait 100 miliseconds
        System.Threading.Thread.Sleep(100);
        // Restart the server
        restart();
        // Tell the remote client handler we handled the command[/FONT]
        return true;
      }
      // Tell the remote client handler we didn't handle the command
      return false;
    }

    Changelog (open)

    v1.4
    - Script engine (C# understanding needed)
    - Minor fixes
    - New console font

    v1.3
    - Added remote "Advanced chat mode", which causes the remote console to act like minecraft chat

    v1.2
    - Added messages to warn about saves a restarts (customizable under the options dialog)
    - Minor bugfixes

    v1.1
    - Cleaned up the interface and replaced the textbox with a richtextbox for the console
    - Minor bugfixes

    v1.0
    - Initial Release
     
  2. Offline

    TerryJ

    This looks good! I've been looking for an actually simple and free wraper with remote support and no player limit. Will defiantly be waiting for updates happily.

    I've been running Bukkit through a VBS script that runs the console hidden. Since this can be put to the system tray I'll be able to still send commands through the console when need be.

    I'll let you know how it goes.
     
    connorcpu likes this.
  3. Offline

    connorcpu

    Thanks. I don't know how long the remote control will take because I also have to manage a server but it shouldn't be more than a couple weeks before its all working.
     
  4. Offline

    connorcpu

    Its official! I have a working remote command system. It can be enabled on the options dialog under TCP/IP, where you should also choose a port and a password for logging in (default passwords are not good, which is why it is disabled by default :p)
     
  5. Offline

    connorcpu

    I know not many people can use it, but if you've got a dev-unlocked windows phone, I've got an app that connects with basic UTF8 TCP just like the server wrapper
    Raw_TCP.xap
     
  6. Offline

    connorcpu

    Version 1.4 is out and boy do I have something AWESOME! Scripting! Fully scriptable class is provided within the program and some helper methods to get things done. You will need some C# knowledge, but pros can customize their client! Methods executed at script load/unload, server start, 60 second tick, macro, and remote command. Anything is possible
     
Thread Status:
Not open for further replies.

Share This Page