{"action":"created","issue":{"url":"https://api.github.com/repos/LanternPowered/LanternServer/issues/26","repository_url":"https://api.github.com/repos/LanternPowered/LanternServer","labels_url":"https://api.github.com/repos/LanternPowered/LanternServer/issues/26/labels{/name}","comments_url":"https://api.github.com/repos/LanternPowered/LanternServer/issues/26/comments","events_url":"https://api.github.com/repos/LanternPowered/LanternServer/issues/26/events","html_url":"https://github.com/LanternPowered/LanternServer/issues/26","id":241688859,"number":26,"title":"Plugin/injection mistakes","user":{"login":"Cybermaxke","id":1364375,"avatar_url":"https://avatars2.githubusercontent.com/u/1364375?v=3","gravatar_id":"","url":"https://api.github.com/users/Cybermaxke","html_url":"https://github.com/Cybermaxke","followers_url":"https://api.github.com/users/Cybermaxke/followers","following_url":"https://api.github.com/users/Cybermaxke/following{/other_user}","gists_url":"https://api.github.com/users/Cybermaxke/gists{/gist_id}","starred_url":"https://api.github.com/users/Cybermaxke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Cybermaxke/subscriptions","organizations_url":"https://api.github.com/users/Cybermaxke/orgs","repos_url":"https://api.github.com/users/Cybermaxke/repos","events_url":"https://api.github.com/users/Cybermaxke/events{/privacy}","received_events_url":"https://api.github.com/users/Cybermaxke/received_events","type":"User","site_admin":false},"labels":[{"id":213569608,"url":"https://api.github.com/repos/LanternPowered/LanternServer/labels/enhancement","name":"enhancement","color":"84b6eb","default":true},{"id":447799404,"url":"https://api.github.com/repos/LanternPowered/LanternServer/labels/low%20priority","name":"low priority","color":"c2e0c6","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-07-10T12:01:09Z","updated_at":"2017-07-10T17:56:29Z","closed_at":null,"body":"You can easily make some mistakes when making a plugin and using injection. It would nice if we could catch these issues prematurely, the same could be done for sponge. A few examples:\r\n\r\n- Using `java.util.logging.Logger` instead of `org.slf4j.Logger` (`org.apache.logging.log4j.Logger` could also work, but is not available in the standard sponge api environment)\r\n- Using wrong `Named` annotations with injection.\r\n  - `com.google.inject.name.Named` - YES\r\n  - `javax.inject.Named` - YES\r\n  - `org.spongepowered.api.event.filter.cause.Named` - NO\r\n- Missing `@Listener` on listener methods. Could be warned about by checking if the method is never called and has a valid listener signature.\r\n- ...\r\n\r\nA annotation processor could help warn about these issues at compile time."},"comment":{"url":"https://api.github.com/repos/LanternPowered/LanternServer/issues/comments/314184494","html_url":"https://github.com/LanternPowered/LanternServer/issues/26#issuecomment-314184494","issue_url":"https://api.github.com/repos/LanternPowered/LanternServer/issues/26","id":314184494,"user":{"login":"Cybermaxke","id":1364375,"avatar_url":"https://avatars2.githubusercontent.com/u/1364375?v=3","gravatar_id":"","url":"https://api.github.com/users/Cybermaxke","html_url":"https://github.com/Cybermaxke","followers_url":"https://api.github.com/users/Cybermaxke/followers","following_url":"https://api.github.com/users/Cybermaxke/following{/other_user}","gists_url":"https://api.github.com/users/Cybermaxke/gists{/gist_id}","starred_url":"https://api.github.com/users/Cybermaxke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Cybermaxke/subscriptions","organizations_url":"https://api.github.com/users/Cybermaxke/orgs","repos_url":"https://api.github.com/users/Cybermaxke/repos","events_url":"https://api.github.com/users/Cybermaxke/events{/privacy}","received_events_url":"https://api.github.com/users/Cybermaxke/received_events","type":"User","site_admin":false},"created_at":"2017-07-10T17:56:29Z","updated_at":"2017-07-10T17:56:29Z","body":"@kinggoesgaming I can try to create a class transformer, that could be run at runtime or maybe in a gradle task. I am not sure how the gradle task would work, but you can transform classes with the shadow plugin."}}
{"actor":{"display_login":"Cybermaxke"}}