mirror of
https://github.com/kaboomserver/extras.git
synced 2025-07-22 21:43:48 +00:00
Replace string concatenation with appending text components (#325)
* Replace string concatenation with appending text
* Fix inconsistent indentation
oops
* indentation
i forgor 💀
This commit is contained in:
parent
03a2fec6f4
commit
a1007853dd
4 changed files with 35 additions and 12 deletions
|
@ -64,8 +64,11 @@ public final class CommandUsername implements CommandExecutor {
|
|||
player.setPlayerProfile(profile);
|
||||
millis = System.currentTimeMillis();
|
||||
|
||||
player.sendMessage(Component
|
||||
.text("Successfully set your username to \"" + name + "\""));
|
||||
player.sendMessage(
|
||||
Component.text("Successfully set your username to \"")
|
||||
.append(Component.text(name))
|
||||
.append(Component.text("\""))
|
||||
);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue