mirror of
https://github.com/darksaid98/Carbon.git
synced 2026-12-01 14:38:48 +00:00
Write Length, not Limit.
This commit is contained in:
1 parent
654964d375
commit
963276bc33
4 files changed
+13
-13
No files matched your search
+4
-4
@@ -132,10 +132,10 @@ public final class NicknameCommand extends CarbonCommand {
|
||||
|
||||
// If the nickname is caught in the character limit, return without setting a nickname.
|
||||
final int nickNameLength = PlainTextComponentSerializer.plainText().serialize(parsedNick.get()).length();
|
||||
final int minLimit = this.config.primaryConfig().nicknameMinLimit();
|
||||
final int maxLimit = this.config.primaryConfig().nicknameMaxLimit();
|
||||
if (nickNameLength < minLimit || maxLimit < nickNameLength) {
|
||||
this.carbonMessages.nicknameErrorCharacterLimit(sender, parsedNick.get(), minLimit, maxLimit);
|
||||
final int minLength = this.config.primaryConfig().nicknameMinLength();
|
||||
final int maxLength = this.config.primaryConfig().nicknameMaxLength();
|
||||
if (nickNameLength < minLength || maxLength < nickNameLength) {
|
||||
this.carbonMessages.nicknameErrorCharacterLimit(sender, parsedNick.get(), minLength, maxLength);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -94,10 +94,10 @@ public class PrimaryConfig {
|
||||
private boolean useCarbonNicknames = true;
|
||||
|
||||
@Comment("Minimum number of characters in nickname.")
|
||||
private int nicknameMinLimit = 3;
|
||||
private int nicknameMinLength = 3;
|
||||
|
||||
@Comment("Maximum number of characters in nickname.")
|
||||
private int nicknameMaxLimit = 16;
|
||||
private int nicknameMaxLength = 16;
|
||||
|
||||
@Comment("Whether Carbon should check for updates using the GitHub API on startup.")
|
||||
private boolean updateChecker = true;
|
||||
@@ -182,12 +182,12 @@ public class PrimaryConfig {
|
||||
return this.useCarbonNicknames;
|
||||
}
|
||||
|
||||
public int nicknameMinLimit() {
|
||||
return this.nicknameMinLimit;
|
||||
public int nicknameMinLength() {
|
||||
return this.nicknameMinLength;
|
||||
}
|
||||
|
||||
public int nicknameMaxLimit() {
|
||||
return this.nicknameMaxLimit;
|
||||
public int nicknameMaxLength() {
|
||||
return this.nicknameMaxLength;
|
||||
}
|
||||
|
||||
public boolean updateChecker() {
|
||||
|
||||
@@ -184,8 +184,8 @@ public interface CarbonMessages {
|
||||
void nicknameErrorCharacterLimit(
|
||||
final Audience audience,
|
||||
final Component nickname,
|
||||
@Placeholder("min_limit") final int minLimit,
|
||||
@Placeholder("max_limit") final int maxLimit
|
||||
final int minLength,
|
||||
final int maxLength
|
||||
);
|
||||
|
||||
@Message("nickname.show.others")
|
||||
|
||||
@@ -97,7 +97,7 @@ nickname.show.others.unset=<target><red> does not have a nickname set
|
||||
nickname.show.others=<target><green>'s nickname is </green><nickname>
|
||||
nickname.show.unset=<red>You do not have a nickname set
|
||||
nickname.show=<green>Your nickname is </green><nickname>
|
||||
nickname.error.character_limit=<red>Nickname "<nickname>" has exceeded the character limit. Must be set to <min_limit>~<max_limit> characters.
|
||||
nickname.error.character_limit=<red>Nickname "<nickname>" has exceeded the character limit. Must be set to <min_length>~<max_length> characters.
|
||||
reply.target.missing=<red>You have no-one to reply to
|
||||
reply.target.self=<red>You cannot whisper to yourself
|
||||
whisper.console=<gold>[<green><sender_display_name></green>] -> [<green><recipient_display_name></green>] <message>
|
||||
|
||||
Reference in new issue
Block a user