{"action":"created","issue":{"url":"https://api.github.com/repos/SpongePowered/SpongeAPI/issues/966","labels_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/issues/966/labels{/name}","comments_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/issues/966/comments","events_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/issues/966/events","html_url":"https://github.com/SpongePowered/SpongeAPI/pull/966","id":123050641,"number":966,"title":"Keep trailing formatting in Texts.of(Objects...)","user":{"login":"ST-DDT","id":1579362,"avatar_url":"https://avatars.githubusercontent.com/u/1579362?v=3","gravatar_id":"","url":"https://api.github.com/users/ST-DDT","html_url":"https://github.com/ST-DDT","followers_url":"https://api.github.com/users/ST-DDT/followers","following_url":"https://api.github.com/users/ST-DDT/following{/other_user}","gists_url":"https://api.github.com/users/ST-DDT/gists{/gist_id}","starred_url":"https://api.github.com/users/ST-DDT/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ST-DDT/subscriptions","organizations_url":"https://api.github.com/users/ST-DDT/orgs","repos_url":"https://api.github.com/users/ST-DDT/repos","events_url":"https://api.github.com/users/ST-DDT/events{/privacy}","received_events_url":"https://api.github.com/users/ST-DDT/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/SpongePowered/SpongeAPI/labels/text","name":"text","color":"0052cc"}],"state":"closed","locked":false,"assignee":{"login":"Minecrell","id":3035868,"avatar_url":"https://avatars.githubusercontent.com/u/3035868?v=3","gravatar_id":"","url":"https://api.github.com/users/Minecrell","html_url":"https://github.com/Minecrell","followers_url":"https://api.github.com/users/Minecrell/followers","following_url":"https://api.github.com/users/Minecrell/following{/other_user}","gists_url":"https://api.github.com/users/Minecrell/gists{/gist_id}","starred_url":"https://api.github.com/users/Minecrell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Minecrell/subscriptions","organizations_url":"https://api.github.com/users/Minecrell/orgs","repos_url":"https://api.github.com/users/Minecrell/repos","events_url":"https://api.github.com/users/Minecrell/events{/privacy}","received_events_url":"https://api.github.com/users/Minecrell/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/SpongePowered/SpongeAPI/milestones/4","html_url":"https://github.com/SpongePowered/SpongeAPI/milestones/Revision%203.0","labels_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/milestones/4/labels","id":1082492,"number":4,"title":"Revision 3.0","description":"This is the third stable revision of the Sponge API, 3.0 ","creator":{"login":"Zidane","id":744482,"avatar_url":"https://avatars.githubusercontent.com/u/744482?v=3","gravatar_id":"","url":"https://api.github.com/users/Zidane","html_url":"https://github.com/Zidane","followers_url":"https://api.github.com/users/Zidane/followers","following_url":"https://api.github.com/users/Zidane/following{/other_user}","gists_url":"https://api.github.com/users/Zidane/gists{/gist_id}","starred_url":"https://api.github.com/users/Zidane/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Zidane/subscriptions","organizations_url":"https://api.github.com/users/Zidane/orgs","repos_url":"https://api.github.com/users/Zidane/repos","events_url":"https://api.github.com/users/Zidane/events{/privacy}","received_events_url":"https://api.github.com/users/Zidane/received_events","type":"User","site_admin":false},"open_issues":31,"closed_issues":96,"state":"open","created_at":"2015-04-24T16:02:08Z","updated_at":"2015-12-22T19:35:12Z","due_on":null,"closed_at":null},"comments":1,"created_at":"2015-12-19T01:01:55Z","updated_at":"2015-12-22T19:35:12Z","closed_at":"2015-12-22T19:35:12Z","pull_request":{"url":"https://api.github.com/repos/SpongePowered/SpongeAPI/pulls/966","html_url":"https://github.com/SpongePowered/SpongeAPI/pull/966","diff_url":"https://github.com/SpongePowered/SpongeAPI/pull/966.diff","patch_url":"https://github.com/SpongePowered/SpongeAPI/pull/966.patch"},"body":"@Minecrell @Aaron1011 Here the fix you requested for [Team prefixes](https://github.com/SpongePowered/SpongeAPI/blob/master/src/main/java/org/spongepowered/api/scoreboard/Team.java#L120).\r\n\r\n## The Issue\r\n\r\nThe current `Texts.of(Object...)` method will ignore all trailing formatting codes, which makes the team prefixes hard to use.\r\n\r\n````java\r\nTexts.of(TextColors.RED) == Texts.of()\r\nTexts.of(TextColors.RED).toPlain() == \"\"\r\nTexts.of(TextColors.RED, \"Foo\").toPlain() == \"&4Foo\"\r\nTexts.of(TextColors.RED, \"Foo\", TextColors.BLUE) == Texts.of(TextColors.RED, \"Foo\")\r\nTexts.of(TextColors.RED, \"Foo\", TextColors.BLUE).toPlain() == \"&4Foo\"\r\n````\r\n\r\n## The Fix\r\n\r\nThe fixed version will append the formatting using an empty text if it was not applied to previous elements.\r\n\r\n````java\r\nTexts.of(TextColors.RED) != Texts.of()\r\nTexts.of(TextColors.RED).toPlain() == \"&4\"\r\nTexts.of(TextColors.RED, \"Foo\").toPlain() == \"&4Foo\"\r\nTexts.of(TextColors.RED, \"Foo\", TextColors.BLUE) != Texts.of(TextColors.RED, \"Foo\")\r\nTexts.of(TextColors.RED, \"Foo\", TextColors.BLUE).toPlain() == \"&4Foo&6\"\r\n````\r\n\r\nIf you have any questions I'll be back in a couple of hours.\r\n\r\n--------------------------------------------------\r\n\r\nPS: I haven't tested it with the method in question yet, nor did I test the capabilities of `toPlain()/toLegacy()`."},"comment":{"url":"https://api.github.com/repos/SpongePowered/SpongeAPI/issues/comments/166711158","html_url":"https://github.com/SpongePowered/SpongeAPI/pull/966#issuecomment-166711158","issue_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/issues/966","id":166711158,"user":{"login":"Minecrell","id":3035868,"avatar_url":"https://avatars.githubusercontent.com/u/3035868?v=3","gravatar_id":"","url":"https://api.github.com/users/Minecrell","html_url":"https://github.com/Minecrell","followers_url":"https://api.github.com/users/Minecrell/followers","following_url":"https://api.github.com/users/Minecrell/following{/other_user}","gists_url":"https://api.github.com/users/Minecrell/gists{/gist_id}","starred_url":"https://api.github.com/users/Minecrell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Minecrell/subscriptions","organizations_url":"https://api.github.com/users/Minecrell/orgs","repos_url":"https://api.github.com/users/Minecrell/repos","events_url":"https://api.github.com/users/Minecrell/events{/privacy}","received_events_url":"https://api.github.com/users/Minecrell/received_events","type":"User","site_admin":false},"created_at":"2015-12-22T19:35:12Z","updated_at":"2015-12-22T19:35:12Z","body":"Thanks"}}