fix: also make .username set greedy since we have .username empty now

This commit is contained in:
Chayapak 2025-03-30 11:25:50 +07:00
parent 8662ee448a
commit 1193bd0bb4
Signed by: ChomeNS
SSH key fingerprint: SHA256:0YoxhdyXsgbc0nfeB2N6FYE60mxMU7DS4uCUMaw2mvA

View file

@ -43,7 +43,7 @@ public class UsernameCommand {
public static void register(CommandDispatcher<FabricClientCommandSource> dispatcher) {
dispatcher.register(literal("username")
.then(literal("set")
.then(argument("username", string())
.then(argument("username", greedyString())
.executes(c -> changeOffline(c, getString(c, "username")))))
.then(literal("revert")
.executes(c -> changeSession(c, ORIGINAL_SESSION)))