{"action":"created","issue":{"url":"https://api.github.com/repos/SpongePowered/SpongeAPI/issues/1076","repository_url":"https://api.github.com/repos/SpongePowered/SpongeAPI","labels_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/issues/1076/labels{/name}","comments_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/issues/1076/comments","events_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/issues/1076/events","html_url":"https://github.com/SpongePowered/SpongeAPI/pull/1076","id":133451705,"number":1076,"title":"Improve pagination API","user":{"login":"Aaron1011","id":1408859,"avatar_url":"https://avatars.githubusercontent.com/u/1408859?v=3","gravatar_id":"","url":"https://api.github.com/users/Aaron1011","html_url":"https://github.com/Aaron1011","followers_url":"https://api.github.com/users/Aaron1011/followers","following_url":"https://api.github.com/users/Aaron1011/following{/other_user}","gists_url":"https://api.github.com/users/Aaron1011/gists{/gist_id}","starred_url":"https://api.github.com/users/Aaron1011/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Aaron1011/subscriptions","organizations_url":"https://api.github.com/users/Aaron1011/orgs","repos_url":"https://api.github.com/users/Aaron1011/repos","events_url":"https://api.github.com/users/Aaron1011/events{/privacy}","received_events_url":"https://api.github.com/users/Aaron1011/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-02-13T17:34:24Z","updated_at":"2016-02-28T18:50:04Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/SpongePowered/SpongeAPI/pulls/1076","html_url":"https://github.com/SpongePowered/SpongeAPI/pull/1076","diff_url":"https://github.com/SpongePowered/SpongeAPI/pull/1076.diff","patch_url":"https://github.com/SpongePowered/SpongeAPI/pull/1076.patch"},"body":"SpongeAPI | [SpongeCommon](https://github.com/SpongePowered/SpongeCommon/pull/504)\r\n\r\nThis supersedes https://github.com/SpongePowered/SpongeAPI/pull/1037 \r\n\r\nThis PR improves the usability of the Pagination API.\r\n\r\nChanges:\r\n* Added `PaginationList`, an immutable version of `PaginationBuilder`. A `PaginationList` is obtained from a `PaginationBuilder`.\r\n* Made `PaginationBuilder` a `ResettableBuilder`\r\n* Changed `PaginationBuilder` to use`MessageReciever`instead of `CommandSource`, and added methods for using `MessageChannel`.\r\n\r\nThis resolves https://github.com/SpongePowered/SpongeAPI/issues/1010"},"comment":{"url":"https://api.github.com/repos/SpongePowered/SpongeAPI/issues/comments/189921609","html_url":"https://github.com/SpongePowered/SpongeAPI/pull/1076#issuecomment-189921609","issue_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/issues/1076","id":189921609,"user":{"login":"Aaron1011","id":1408859,"avatar_url":"https://avatars.githubusercontent.com/u/1408859?v=3","gravatar_id":"","url":"https://api.github.com/users/Aaron1011","html_url":"https://github.com/Aaron1011","followers_url":"https://api.github.com/users/Aaron1011/followers","following_url":"https://api.github.com/users/Aaron1011/following{/other_user}","gists_url":"https://api.github.com/users/Aaron1011/gists{/gist_id}","starred_url":"https://api.github.com/users/Aaron1011/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Aaron1011/subscriptions","organizations_url":"https://api.github.com/users/Aaron1011/orgs","repos_url":"https://api.github.com/users/Aaron1011/repos","events_url":"https://api.github.com/users/Aaron1011/events{/privacy}","received_events_url":"https://api.github.com/users/Aaron1011/received_events","type":"User","site_admin":false},"created_at":"2016-02-28T18:50:04Z","updated_at":"2016-02-28T18:50:04Z","body":"Currently, the pagination calculator system is broken. It require plugins to register a calculator for each concrete class which implements an interface (e.g. `EntityPlayerMP`). I've thought of a few different ways to fix this:\r\n\r\n* To determine the calculator for a `MessageReceiver`, iterate over its implemented interfaces, and check for a registered calculator for each one.\r\n* Require plugins to specify the calculator they want to use when building a `PaginationList`\r\n* Some combination of the above two approaches, where a plugin can use some sort of registry to determine which calculators to use.\r\n\r\nPinging @SpongePowered/developers for thoughts."}}