Remove Galaxy dependency
Switched back to paper since we don't use any features from Galaxy that aren't already in paper
This commit is contained in:
@@ -149,24 +149,24 @@ public class NickUtilities
|
||||
|
||||
public static boolean validNick(Player sender, OfflinePlayer target, String nickName) {
|
||||
if (!noBlockedCodes(nickName)) {
|
||||
sender.sendMiniMessage(Config.NICK_BLOCKED_COLOR_CODES, null);
|
||||
sender.sendRichMessage(Config.NICK_BLOCKED_COLOR_CODES);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!Utility.checkNickBrightEnough(nickName)) {
|
||||
sender.sendMiniMessage("<red>At least one color must be brighter than 30 for each color</red>", null);
|
||||
sender.sendRichMessage("<red>At least one color must be brighter than 30 for each color</red>");
|
||||
return false;
|
||||
}
|
||||
|
||||
String cleanNick = NickUtilities.removeAllColors(nickName);
|
||||
|
||||
if (cleanNick.length() < 3 || cleanNick.length() > 16) {
|
||||
sender.sendMiniMessage(Config.NICK_INVALID_LENGTH, null);
|
||||
sender.sendRichMessage(Config.NICK_INVALID_LENGTH);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!cleanNick.matches("[a-zA-Z0-9_]*") || nickName.length() > 192) { //192 is if someone puts {#xxxxxx<>} in front of every letter
|
||||
sender.sendMiniMessage(Config.NICK_INVALID_CHARACTERS, null);
|
||||
sender.sendRichMessage(Config.NICK_INVALID_CHARACTERS);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -183,7 +183,7 @@ public class NickUtilities
|
||||
if (uniqueId.equals(uuid)){
|
||||
ChatPlugin.getInstance().getLogger().info(uuid + " " + uniqueId);
|
||||
}
|
||||
sender.sendMiniMessage(Config.NICK_TAKEN, null);
|
||||
sender.sendRichMessage(Config.NICK_TAKEN);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user