{"action":"created","issue":{"url":"https://api.github.com/repos/pmmp/PocketMine-MP/issues/2969","repository_url":"https://api.github.com/repos/pmmp/PocketMine-MP","labels_url":"https://api.github.com/repos/pmmp/PocketMine-MP/issues/2969/labels{/name}","comments_url":"https://api.github.com/repos/pmmp/PocketMine-MP/issues/2969/comments","events_url":"https://api.github.com/repos/pmmp/PocketMine-MP/issues/2969/events","html_url":"https://github.com/pmmp/PocketMine-MP/issues/2969","id":456674517,"node_id":"MDU6SXNzdWU0NTY2NzQ1MTc=","number":2969,"title":"/reload, re-imagined","user":{"login":"lukeeey","id":32024335,"node_id":"MDQ6VXNlcjMyMDI0MzM1","avatar_url":"https://avatars2.githubusercontent.com/u/32024335?v=4","gravatar_id":"","url":"https://api.github.com/users/lukeeey","html_url":"https://github.com/lukeeey","followers_url":"https://api.github.com/users/lukeeey/followers","following_url":"https://api.github.com/users/lukeeey/following{/other_user}","gists_url":"https://api.github.com/users/lukeeey/gists{/gist_id}","starred_url":"https://api.github.com/users/lukeeey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lukeeey/subscriptions","organizations_url":"https://api.github.com/users/lukeeey/orgs","repos_url":"https://api.github.com/users/lukeeey/repos","events_url":"https://api.github.com/users/lukeeey/events{/privacy}","received_events_url":"https://api.github.com/users/lukeeey/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2019-06-16T19:37:38Z","updated_at":"2019-06-16T20:04:29Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"## Description\r\nA few things that /reload did were not very useful and misleading, like reloading plugins. This doesn't mean that it was *entirely* useless, though.\r\n\r\nFor example, it could be used to reload config files (plugin configs / language files, ops list, ban list, server.properties etc). I think we can all agree that quickly editing these files and reloading is a useful and needed feature (especially during public plugin development).\r\n\r\nOf course we can implement commands into our plugins to reload our configs, however this means a lot of extra commands and still does not solve the issue that we cannot reload server config files.\r\n\r\n## Proposal\r\n#### 1) Re-implement the /reload command, with different arguments.\r\n`/reload` - reload all config files and plugins\r\n`/reload config <enum: [ops, bans, ip-bans, server]>` - reload specified config\r\n`/reload plugin <string: name>` - reload specified plugin\r\n\r\n#### 2) Add an `onReload()` method to `Plugin` and `PluginBase` that is called when the /reload command is executed\r\nThis method should not be called by plugins at all\r\n\r\n## Justification\r\nI feel like this removal was not completely thought out, and i also feel that the reload functionality was not implemented very well in the first place. This proposal re-introduces the /reload command with the useful features it once had, while leaving out the not-so-useful features that gave the feature a bad reputation.\r\n\r\nThis is targeted at 4.0 as the reload command has already been removed there and it would be a BC break to implement it in 3.x.\r\n\r\n------\r\n\r\np.s. whitelist reloading is already handled in the /whitelist command and is not covered by this proposal, however it may be useful to add it to the config enum."},"comment":{"url":"https://api.github.com/repos/pmmp/PocketMine-MP/issues/comments/502481536","html_url":"https://github.com/pmmp/PocketMine-MP/issues/2969#issuecomment-502481536","issue_url":"https://api.github.com/repos/pmmp/PocketMine-MP/issues/2969","id":502481536,"node_id":"MDEyOklzc3VlQ29tbWVudDUwMjQ4MTUzNg==","user":{"login":"lukeeey","id":32024335,"node_id":"MDQ6VXNlcjMyMDI0MzM1","avatar_url":"https://avatars2.githubusercontent.com/u/32024335?v=4","gravatar_id":"","url":"https://api.github.com/users/lukeeey","html_url":"https://github.com/lukeeey","followers_url":"https://api.github.com/users/lukeeey/followers","following_url":"https://api.github.com/users/lukeeey/following{/other_user}","gists_url":"https://api.github.com/users/lukeeey/gists{/gist_id}","starred_url":"https://api.github.com/users/lukeeey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lukeeey/subscriptions","organizations_url":"https://api.github.com/users/lukeeey/orgs","repos_url":"https://api.github.com/users/lukeeey/repos","events_url":"https://api.github.com/users/lukeeey/events{/privacy}","received_events_url":"https://api.github.com/users/lukeeey/received_events","type":"User","site_admin":false},"created_at":"2019-06-16T20:04:29Z","updated_at":"2019-06-16T20:04:29Z","author_association":"CONTRIBUTOR","body":"* Plugins would obviously have to change the behaviour to account for reloading (and implementing onReload() is completely *optional*, so existing plugins would continue to work\r\n* Why would it matter if they use `getConfig()`? They should implement their own logic to reload the configs or whatever other data should be reloaded\r\n* Thats a good point, so i suggest only allowing reloading server.properties, as pretty much all those settings (except port) can be changed while the server is running\r\n* That is a good point, however by having it in a single command it actually would provide consistency - to the user, at least. As with `onDisable()`, we should hope the plugin developer does nothing stupid in it that could break anything."}}
{"actor":{"display_login":"lukeeey"}}