[REQ] Warn on /reload Command

Discussion in 'Archived: Plugin Requests' started by 1nd1g0, Oct 6, 2011.

  1. Offline

    1nd1g0

    I would like there to be a message when I do /reload
    The message should say Warning!: Reloading Plugins. Server May be Unresponsive.
     
  2. Offline

    Daniel Heppner

    This shouldn't be too hard. I could do this for you, gimme a few hours. I'm busy atm.
     
  3. Offline

    md_5

    Its about 3 lines of code :eek:

    Daniel will do it, im sure
     
  4. Well, if you want to make it nice it's a bit more.

    @Daniel Heppner: I have an idea:
    If an admin types /reload start a SyncDelayedTask and warn the user that the server reloads in 10 seconds (200 ticks). The run method of the task should kick all users with something like "Server reload!" as the kick message and after the last user is kicked it should reload the server. :)

    //EDIT: And make the task cancellable... ;)
     
  5. Offline

    MuisYa

    Can someone tell me how to unload+load all plugins?
    I got this plugin done already, only that part not yet.

    (Fixed plugins reloading solo)
     
  6. Couldn't you just do something like this?

    Code:java
    1. public void onDisable() {
    2. getServer().broadcastMessage("herp derp");
    3. }
     
  7. Offline

    MuisYa

    Lol? Thats sending a message when this plugin disables...
    LOL
     
  8. Wasn't that what he requested? /derp
     
  9. Offline

    Daniel Heppner

    Okay, so you're obviously better at at the Bukkit API, and you probably have more free time than I do, so I think you should do it. I was planning in throwing someone into onDisable and sending it to this person and forgetting about it. I don't know about SyncDelayedTasks. I suppose it would be a good time to learn although I really don't have much time at all. (SOOO much homework)
     
  10. Offline

    MuisYa

    If someone can tell me the API on how to reload ALL PLUGINS then i can make this...
     
  11. Why would you want to do that?
     
  12. Offline

    MuisYa

    Why i want that? Because this plugin NEEDS TO RELOAD all plugins?
    Dude read the thread lol?
     
  13. Herp derp...
    There's already a command for that, it's called "/reload" or "/rl". Oh, and FYI, reloading DISABLES plugins.
     
  14. Offline

    1nd1g0

    So ummm who's able to do this?
     
  15. Offline

    1nd1g0

    How about just having the plugin override the /reload command so when i type /reload the plugin will say the message, wait a little bit, then do the command?
     
  16. @1nd1g0: That's exactly how I want to implement this. In fact the code is there, just need to test it (tomorrow maybe...) ;)
     
  17. Offline

    1nd1g0

    okay i can wait..
     
  18. Offline

    Pixiio

    I like to see this too :)
     
  19. Offline

    MuisYa

    @V10lator Gimme that API, than i can release it. My plugin is a 100% done...
     
  20. @MuisYa: It's not an API, it's a full featured plugin which replaces /reload and /stop. The only problem is that I couldn't test it till now... ;)

    If anybody want to speed up developing, please test this: <Edit by Moderator: Redacted mediafire url>

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

    md_5

    WTF why all this stuff. It looks like someone else has done it but look:
    On command prpreocess
    If command.equals reload || rl
    Schedule async task blah blah blah 200
    Event.setcancelled


    Run()
    For player
    Player.kick
    Broadcast()
    Getserver.reload
     
  22. Offline

    1nd1g0

     
    Last edited by a moderator: Nov 12, 2016
  23. Offline

    Daniel Heppner

     
    Last edited by a moderator: Nov 12, 2016
  24. Offline

    Icelaunche

    1. It also doesn't work for me
    2. Can i see the source?
    3. I think ill give it a try to lol
     
  25. Offline

    scranner

  26. Offline

    MuisYa

    *Slaps scranner*
    Thats illegal ;)
     
  27. Offline

    Icelaunche

    win.
    Code:
     p.sendMessage(ChatColor.RED + "Bukkit sad. Bukkit want you to access command, but Bukkit cannot let you. Bukkit will leak teaks. :'(");
     
  28. Sorry guys, forgot the permission node (superPerms):
    Code:
      betterstop.admin:
        description: Reload/Stop the server.
        default: op
    @all who want the sources: They will be released with the final version. ;)
     
  29. Offline

    Daniel Heppner

Share This Page