I would like there to be a message when I do /reload The message should say Warning!: Reloading Plugins. Server May be Unresponsive.
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...
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)
Couldn't you just do something like this? Code:java public void onDisable() { getServer().broadcastMessage("herp derp");}
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)
Herp derp... There's already a command for that, it's called "/reload" or "/rl". Oh, and FYI, reloading DISABLES plugins.
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?
@1nd1g0: That's exactly how I want to implement this. In fact the code is there, just need to test it (tomorrow maybe...)
@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.
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
win. Code: p.sendMessage(ChatColor.RED + "Bukkit sad. Bukkit want you to access command, but Bukkit cannot let you. Bukkit will leak teaks. :'(");
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.