Get Bukkit Console

Discussion in 'Plugin Development' started by chunza2542, Apr 19, 2016.

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

    chunza2542

    How to get bukkit console with minecraft plugin.
    i want to send console to the web
    thank you
     
  2. Offline

    timtower Administrator Administrator Moderator

  3. Offline

    mcdorli

    Console to the web?
     
  4. Offline

    bennie3211

    I think he want's to send all the data in his server console to a webpage
     
  5. Offline

    mcdorli

    Not sure if it's legal, it contains IPs and such, also passwords for some plugins like Authme
     
  6. Offline

    timtower Administrator Administrator Moderator

    Authme is generally only used for offline mode which is not supported anyways, filters would do the trick there.
    And then would Multicraft also be illegal, as well as loads of other systems.
     
  7. Offline

    bennie3211

    I think he wan't the text in the console be shown on a webpage, dunno if its legal or not. But rented servers do the samen? It can show a console in a webpage too or is that different than what he wants to do?
     
  8. Offline

    mythbusterma

    @mcdorli

    There's nothing illegal about showing IPs and passwords, especially just to server owners. I'm not sure why you think everything is illegal.

    Honestly, you could show that information to everyone on the server and still be legal.
     
  9. Offline

    chunza2542

    I make the admin control panel and I want to make a mc plugin to send the server console in to my web page.
     
  10. Offline

    mythbusterma

    @chunza2542

    You'd have to look into how to hook into the Logger that Bukkit uses (log4j, if I recall correctly), or you can add stdout redirection to it (I'm not sure if this is possible in Java).

    These are non-trivial tasks, and you should be quite comfortable in Java before attempting this.
     
  11. Offline

    I Al Istannen

    @mythbusterma @chunza2542
    The getLogger() method in the JavaPlugin returns a "java.util.logging.Logger". You can just get the Root logger and add a new handler. I tried it with printing the values to the console and it worked fine. I don't know how it handles the delay from a Websocket though. There is a FileHandler, so it should work, I guess. I am not sure though!
     
  12. Offline

    mythbusterma

    @I Al Istannen

    Well it probably is actually a log4J Logger (which implements java.util.logging.Logger) and you'd have to look into the internals to actually capture all plugins' output and things like that.

    Like I said though, non-trivial amount of work.
     
    I Al Istannen likes this.
Thread Status:
Not open for further replies.

Share This Page