{"action":"created","issue":{"url":"https://api.github.com/repos/SpigotMC/BungeeCord/issues/1316","labels_url":"https://api.github.com/repos/SpigotMC/BungeeCord/issues/1316/labels{/name}","comments_url":"https://api.github.com/repos/SpigotMC/BungeeCord/issues/1316/comments","events_url":"https://api.github.com/repos/SpigotMC/BungeeCord/issues/1316/events","html_url":"https://github.com/SpigotMC/BungeeCord/pull/1316","id":53205675,"number":1316,"title":"Add methods for concisely resetting parts of a component to ComponentBuilder.","user":{"login":"minecrafter","id":979956,"avatar_url":"https://avatars.githubusercontent.com/u/979956?v=3","gravatar_id":"","url":"https://api.github.com/users/minecrafter","html_url":"https://github.com/minecrafter","followers_url":"https://api.github.com/users/minecrafter/followers","following_url":"https://api.github.com/users/minecrafter/following{/other_user}","gists_url":"https://api.github.com/users/minecrafter/gists{/gist_id}","starred_url":"https://api.github.com/users/minecrafter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/minecrafter/subscriptions","organizations_url":"https://api.github.com/users/minecrafter/orgs","repos_url":"https://api.github.com/users/minecrafter/repos","events_url":"https://api.github.com/users/minecrafter/events{/privacy}","received_events_url":"https://api.github.com/users/minecrafter/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2014-12-31T22:03:51Z","updated_at":"2015-02-14T13:35:08Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/SpigotMC/BungeeCord/pulls/1316","html_url":"https://github.com/SpigotMC/BungeeCord/pull/1316","diff_url":"https://github.com/SpigotMC/BungeeCord/pull/1316.diff","patch_url":"https://github.com/SpigotMC/BungeeCord/pull/1316.patch"},"body":"This method adds `reset()`, `retain()`, and a new overload of `append()` that accepts the parts of the components to be retained to `ComponentBuilder`. This is useful to cut down on boilerplate and prevent incorrect usage of `ComponentBuilder`.\r\n\r\n**Original description:**\r\n\r\nThis method is simple: it resets the current part to default settings, keeping only the current text. It therefore acts like the old ChatColor.RESET code.\r\n\r\nThis method can save several lines of code in certain complex usages of ComponentBuilder. A test is included to ensure that `reset()` properly works."},"comment":{"url":"https://api.github.com/repos/SpigotMC/BungeeCord/issues/comments/74375150","html_url":"https://github.com/SpigotMC/BungeeCord/pull/1316#issuecomment-74375150","issue_url":"https://api.github.com/repos/SpigotMC/BungeeCord/issues/1316","id":74375150,"user":{"login":"JBou","id":4021928,"avatar_url":"https://avatars.githubusercontent.com/u/4021928?v=3","gravatar_id":"","url":"https://api.github.com/users/JBou","html_url":"https://github.com/JBou","followers_url":"https://api.github.com/users/JBou/followers","following_url":"https://api.github.com/users/JBou/following{/other_user}","gists_url":"https://api.github.com/users/JBou/gists{/gist_id}","starred_url":"https://api.github.com/users/JBou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JBou/subscriptions","organizations_url":"https://api.github.com/users/JBou/orgs","repos_url":"https://api.github.com/users/JBou/repos","events_url":"https://api.github.com/users/JBou/events{/privacy}","received_events_url":"https://api.github.com/users/JBou/received_events","type":"User","site_admin":false},"created_at":"2015-02-14T13:35:08Z","updated_at":"2015-02-14T13:35:08Z","body":"If I use the following code, the whole line has a click event, but I only want that the Player name is clickable. So I think that the .append() method should reset the following part to default settings.\r\n```java\r\nnew ComponentBuilder(player.getName()).color(ChatColor.AQUA).event(new ClickEvent(ClickEvent.Action.RUN_COMMAND, \"/friends show \" + player.getName())).append(\" is offline!\").color(ChatColor.RED).create();\r\n```"}}