{"action":"created","issue":{"url":"https://api.github.com/repos/iTXTech/Genisys/issues/1848","repository_url":"https://api.github.com/repos/iTXTech/Genisys","labels_url":"https://api.github.com/repos/iTXTech/Genisys/issues/1848/labels{/name}","comments_url":"https://api.github.com/repos/iTXTech/Genisys/issues/1848/comments","events_url":"https://api.github.com/repos/iTXTech/Genisys/issues/1848/events","html_url":"https://github.com/iTXTech/Genisys/pull/1848","id":174968012,"number":1848,"title":"Feature update: Add ability to enable/disable commands in pocketmine.yml","user":{"login":"dktapps","id":14214667,"avatar_url":"https://avatars.githubusercontent.com/u/14214667?v=3","gravatar_id":"","url":"https://api.github.com/users/dktapps","html_url":"https://github.com/dktapps","followers_url":"https://api.github.com/users/dktapps/followers","following_url":"https://api.github.com/users/dktapps/following{/other_user}","gists_url":"https://api.github.com/users/dktapps/gists{/gist_id}","starred_url":"https://api.github.com/users/dktapps/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dktapps/subscriptions","organizations_url":"https://api.github.com/users/dktapps/orgs","repos_url":"https://api.github.com/users/dktapps/repos","events_url":"https://api.github.com/users/dktapps/events{/privacy}","received_events_url":"https://api.github.com/users/dktapps/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-09-04T20:29:06Z","updated_at":"2016-09-05T15:47:29Z","closed_at":"2016-09-05T11:39:00Z","pull_request":{"url":"https://api.github.com/repos/iTXTech/Genisys/pulls/1848","html_url":"https://github.com/iTXTech/Genisys/pull/1848","diff_url":"https://github.com/iTXTech/Genisys/pull/1848.diff","patch_url":"https://github.com/iTXTech/Genisys/pull/1848.patch"},"body":"### Description\r\nThis PR adds the ability to enable or disable commands in pocketmine.yml, allowing server owners to declutter the /help command of useless commands.\r\n\r\n### How this works\r\nIt's quite straightforward. Under the new `commands` section in pocketmine.yml there is a default behaviour option. This will be used when no specific configuration is set for a command. Setting the default as FALSE will provide a whitelist behaviour (only the commands you select are enabled). Setting the default as TRUE will provide a blacklist behaviour (remove commands you don't want).\r\n\r\nTo set specific behaviour for a command, simply add a key under the `commands` section with the name of the command you want to override the default for. For example, using the whitelist behaviour and wanting to disable the /version and /plugins  commands, I would do this:\r\n```\r\ncommands:\r\n #Here you can customize server commands\r\n #Specify command names to override the default set here.\r\n #If no custom value is defined for a command, the default will be used.\r\n #NOTE: Some commands cannot be disabled here, such as the important ones like /stop, /reload, etc.\r\n default: true\r\n #Set override values per command here\r\n #For example, uncommenting the below will disable /plugins and /version\r\n version: false\r\n plugins: false\r\n```\r\n\r\n### Reason to modify\r\n<!-- \r\n- Think twice before modifying: is it the best way? will it break things? \r\n- Have you made sure that there is actually a problem before trying to fix it?\r\n- Explain the logic behind your changes - WHY and HOW what you have done works\r\n-->\r\nAdd ability for server owners to remove commands that are never used. For example, I never use /bancid, but no doubt it comes in useful for other people. \r\nThis works by preventing disabled commands from being loaded.\r\n\r\n#### Things worth noting:\r\n- This does NOT block commands; it prevents disabled commands from being loaded at all. This is therefore less flexible than using a permissions plugin as it cannot be changed at runtime. However, if all you want to do is remove some commands that you never use, then this will be a bonus.\r\n- Some commands cannot be disabled for obvious reasons, such as /help, /stop, /reload\r\n\r\n### Tests & Reviews\r\nI have tested this under both white- and blacklist configuration and found no issues. Please comment below if you encounter issues.\r\n\r\n### Please review things below:\r\n- This configuration will also affect plugin commands. Whether or not this behaviour should be retained is something I'm unsure on. Please comment."},"comment":{"url":"https://api.github.com/repos/iTXTech/Genisys/issues/comments/244775341","html_url":"https://github.com/iTXTech/Genisys/pull/1848#issuecomment-244775341","issue_url":"https://api.github.com/repos/iTXTech/Genisys/issues/1848","id":244775341,"user":{"login":"XFuryMCPE","id":15511870,"avatar_url":"https://avatars.githubusercontent.com/u/15511870?v=3","gravatar_id":"","url":"https://api.github.com/users/XFuryMCPE","html_url":"https://github.com/XFuryMCPE","followers_url":"https://api.github.com/users/XFuryMCPE/followers","following_url":"https://api.github.com/users/XFuryMCPE/following{/other_user}","gists_url":"https://api.github.com/users/XFuryMCPE/gists{/gist_id}","starred_url":"https://api.github.com/users/XFuryMCPE/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/XFuryMCPE/subscriptions","organizations_url":"https://api.github.com/users/XFuryMCPE/orgs","repos_url":"https://api.github.com/users/XFuryMCPE/repos","events_url":"https://api.github.com/users/XFuryMCPE/events{/privacy}","received_events_url":"https://api.github.com/users/XFuryMCPE/received_events","type":"User","site_admin":false},"created_at":"2016-09-05T15:47:29Z","updated_at":"2016-09-05T15:47:29Z","body":"If a server has a specific tag they use in their server, or a modified /help command, they could do \"Error> Command not found! Type /commands for a list of available commands!\" or something like that"}}
{"actor":{"display_login":"XFuryMCPE"}}