9
0
mirror of https://github.com/LeavesMC/Leaves.git synced 2025-12-29 20:09:23 +00:00

refactor: better msg

This commit is contained in:
MC_XiaoHei
2025-08-24 16:19:53 +08:00
parent dfeb9196b7
commit 568bf16b31

View File

@@ -76,7 +76,7 @@ public class CreateCommand extends BotSubcommand {
private static boolean canCreate(CommandSender sender, @NotNull String name) {
BotList botList = BotList.INSTANCE;
if (!name.matches("^[a-zA-Z0-9_]{4,16}$")) {
sender.sendMessage(text("This name is illegal", NamedTextColor.RED));
sender.sendMessage(text("This name is illegal, bot name must be 4-16 characters and contain only letters, numbers, and underscores.", NamedTextColor.RED));
return false;
}
@@ -86,7 +86,7 @@ public class CreateCommand extends BotSubcommand {
}
if (LeavesConfig.modify.fakeplayer.unableNames.contains(name)) {
sender.sendMessage(text("This name is not allowed", NamedTextColor.RED));
sender.sendMessage(text("This name is not allowed in this server", NamedTextColor.RED));
return false;
}