A couple of questions about java & bukkit.

Discussion in 'Plugin Development' started by avatarDr, Feb 4, 2013.

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

    avatarDr

    I make a GUI for server, and face 2 problems (however solving 1st also solves 2nd).
    1) Is it possible to run bukkit from another java project in the thread of this project. So that I get access to it's methods, but the main thread doesn't belong to bukkit.
    When I run GUI as a bukkit plugin the earlies time it could run - plugin's onLoad() method. Thereby I can't log anything happened before it (as I plan to deactivate basic console).
    2) Is it possible to make that bukkit machine won't stop after using bukkit.shutdown().
    When I stop server it also stops the thread with GUI, but I would like it to only be closed manually, without dependency on bukkit.
    P.s. Sorry for my eng.
     
  2. Offline

    raGan.

    Yes, it is possible.
     
  3. Offline

    avatarDr

    Great! Now I feel myself much better.
     
  4. Offline

    raGan.

    But I'm not sure about acessing its methods, because bukkit is mostly not thread safe. I believe it can be done, because we can see it on various web based user interfaces.
     
  5. Offline

    avatarDr

    The main thing I need is to have GUI with server log working independently from bukkit. Probably there is another way to do it.
     
  6. Offline

    avatarDr

  7. Offline

    microgeek

  8. Offline

    avatarDr

    There are no arguments, only method to parse them. Ok, what should I use in main(args) to simply run server?
     
  9. Offline

    Tirelessly

    Memory arguments, I think.
     
  10. Offline

    Sagacious_Zed Bukkit Docs

    avatarDr Bukkit itself while it does accept launch arguments does not require them to start.
     
  11. Offline

    avatarDr

    Oh, yeah. main(new String[0]) works fine.

    However when I use command "stop" it still stops my GUI. Why? I already tried to run this method in new thread, result is the same.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 31, 2016
  12. Offline

    Sagacious_Zed Bukkit Docs

    If you run within the same jvm anyone issuing a system.exit will cause the jvm to stop.
     
  13. Offline

    avatarDr

    Ok, so where does mine server use it? I searched through it's methods but didn't find anything.
     
  14. Offline

    avatarDr

    Dam, there are really no invocations of System.exit(), it only closes Minecraft threads. So why does it also close mine?
     
Thread Status:
Not open for further replies.

Share This Page