{"action":"closed","issue":{"url":"https://api.github.com/repos/Xephi/AuthMeReloaded/issues/306","labels_url":"https://api.github.com/repos/Xephi/AuthMeReloaded/issues/306/labels{/name}","comments_url":"https://api.github.com/repos/Xephi/AuthMeReloaded/issues/306/comments","events_url":"https://api.github.com/repos/Xephi/AuthMeReloaded/issues/306/events","html_url":"https://github.com/Xephi/AuthMeReloaded/issues/306","id":120509224,"number":306,"title":"[Dev] Command refactorings - revise ExecutableCommand implementations","user":{"login":"ljacqu","id":8417009,"avatar_url":"https://avatars.githubusercontent.com/u/8417009?v=3","gravatar_id":"","url":"https://api.github.com/users/ljacqu","html_url":"https://github.com/ljacqu","followers_url":"https://api.github.com/users/ljacqu/followers","following_url":"https://api.github.com/users/ljacqu/following{/other_user}","gists_url":"https://api.github.com/users/ljacqu/gists{/gist_id}","starred_url":"https://api.github.com/users/ljacqu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ljacqu/subscriptions","organizations_url":"https://api.github.com/users/ljacqu/orgs","repos_url":"https://api.github.com/users/ljacqu/repos","events_url":"https://api.github.com/users/ljacqu/events{/privacy}","received_events_url":"https://api.github.com/users/ljacqu/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":{"login":"ljacqu","id":8417009,"avatar_url":"https://avatars.githubusercontent.com/u/8417009?v=3","gravatar_id":"","url":"https://api.github.com/users/ljacqu","html_url":"https://github.com/ljacqu","followers_url":"https://api.github.com/users/ljacqu/followers","following_url":"https://api.github.com/users/ljacqu/following{/other_user}","gists_url":"https://api.github.com/users/ljacqu/gists{/gist_id}","starred_url":"https://api.github.com/users/ljacqu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ljacqu/subscriptions","organizations_url":"https://api.github.com/users/ljacqu/orgs","repos_url":"https://api.github.com/users/ljacqu/repos","events_url":"https://api.github.com/users/ljacqu/events{/privacy}","received_events_url":"https://api.github.com/users/ljacqu/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/Xephi/AuthMeReloaded/milestones/1","html_url":"https://github.com/Xephi/AuthMeReloaded/milestones/5.2%20Release","labels_url":"https://api.github.com/repos/Xephi/AuthMeReloaded/milestones/1/labels","id":1460085,"number":1,"title":"5.2 Release","description":"","creator":{"login":"sgdc3","id":8779252,"avatar_url":"https://avatars.githubusercontent.com/u/8779252?v=3","gravatar_id":"","url":"https://api.github.com/users/sgdc3","html_url":"https://github.com/sgdc3","followers_url":"https://api.github.com/users/sgdc3/followers","following_url":"https://api.github.com/users/sgdc3/following{/other_user}","gists_url":"https://api.github.com/users/sgdc3/gists{/gist_id}","starred_url":"https://api.github.com/users/sgdc3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sgdc3/subscriptions","organizations_url":"https://api.github.com/users/sgdc3/orgs","repos_url":"https://api.github.com/users/sgdc3/repos","events_url":"https://api.github.com/users/sgdc3/events{/privacy}","received_events_url":"https://api.github.com/users/sgdc3/received_events","type":"User","site_admin":false},"open_issues":7,"closed_issues":15,"state":"open","created_at":"2015-12-14T20:23:54Z","updated_at":"2016-01-09T22:05:51Z","due_on":"2016-01-30T23:00:00Z","closed_at":null},"comments":5,"created_at":"2015-12-04T23:45:20Z","updated_at":"2016-01-09T22:05:51Z","closed_at":"2016-01-09T22:05:51Z","body":"This is being done by me, @ljacqu, along with #305 on a separate branch as part of a refactoring of the commands handling in AuthMe. This issue serves as a reference for the changes that will take place, and allows me to add an issue number to the commit messages that will result.\r\n\r\nThis story comprises three main goals:\r\n1) a. Rename any executable command class names that exist twice. This is very misleading and very dangerous. I'm thinking adding `Admin` to any such classes would probably be the way to go.\r\nb. Revise the packages. Ideally changes shouldn't be too big (imho not much gain from moving things around like crazy) but the packages aren't balanced at all. The `command.executable.email` package is great for example because it's a logical package (deal with email commands).\r\n\r\n2) Provide some abstraction for the commands. In particular, an abstract class could be put below `ExecutableCommand` for player-only commands. This can take care of the `sender instanceof Player` check for such commands, centrally and in a consistent manner. We will need to verify if any other such subtypes would make sense.\r\n\r\n3) Provide a service to the command implementations so we don't need to get any of the other instances statically. A [facade service](http://blog.ploeh.dk/2010/02/02/RefactoringtoAggregateServices/) is probably the way to go there.\r\n\r\nIf someone has interest in working on these goals, please contact me."}}