Run .Bat files from in game

Discussion in 'Archived: Plugin Requests' started by creeperded153, Jul 24, 2014.

?

Can you work on this?

  1. Yes

    33.3%
  2. No

    33.3%
  3. I Could give It A Shot

    33.3%
  1. Offline

    creeperded153

    Hey Guys, I was wondering if someone could make me a plugin which allows me to run custom batch files from in game, through commands or command blocks or possibly through interaction of a block.

    Suggested name: BatRun

    What I want: I want to be able to run .bat files that i have placed in a folder in my plugins directory and to run the bat files i would like to use either commands or use block interactions or possible both.

    Ideas For Commands: /bat <.bat file name> <how many times>(if possible, if not drop the amount of times to run the file)

    When I'd Like It By: As Soon As Possible
     
  2. Offline

    Toyz

    This is very possible to do.

    But the question is do you want it to run server side or client side (Client side is not possible)

    --- Edit ---

    Already got 90% of it working without even really trying... Pretty simple plugin honestly. Though I need to know if you want it to message the user the output & if "task" is finished
     
  3. Offline

    creeperded153

    Server side sounds fine :) do you have a date that it will be done? or is it too soon to know?
     
  4. Offline

    Toyz


    I'm almost done now running test on the code now

    -- Edit ---
    If your running your server on linux servers you need to do the following before scripts with fire

    Code:
    sudo chmod +x script.sh
     
    - .bat is used in windows were as .sh is used in linux
     
  5. Offline

    creeperded153

    Ok thank you :) and yes it would be good to have a message output :)
     
  6. Offline

    Toyz

    creeperded153 I sent you a message with a direct download to the plugin
     
  7. Online

    timtower Administrator Administrator Moderator

    Toyz Why not just a link here?
     
  8. Offline

    Toyz

    Because I like to make exclusive things if they are ok with me to releasing it public I will but it's up to them as there the one who wanted it
     
  9. Offline

    JBoss925

    May I ask how this is used?
     
  10. Offline

    Toyz

    Could be used to run back-up, automation and other task from the client or even possible run apt-get from it if your running on root (which isn't smart)

    Windows wise you can do other things like "Ping" run "Ruby, Python and others through batch" and many other task's even possible to restart and shutdown the system

    Download:https://www.dropbox.com/s/gt07hr27d2ofx0e/BatRun.jar

    All scripts go in the "BatRun/Scripts" folder there is already a example.bat in the folder when you first run the plugin

    Config.yml allows you to change the BatRun Prefix

    Permissions
    batrun.bat - Allows you to run the /bat command

    Commands
    /bat - usage: /bat <file.bat> [Times to run] (Note anything in [] is optional

    Supported versions of java
    Java 7+

    Supported server version
    1.7.8+

    Known issues
    None at the moment if you find any please contact me and I will patch them for you

    Supported Operating systems
    Windows (File type .bat, exe)
    Linux (File type .sh)
    - You must do "chmod +x script.sh" in order to use the script on linux

    --- Preview Output ---
    [​IMG]

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 9, 2016
    Edrynaath likes this.

Share This Page