Reduce required length of player names GH-226

This commit is contained in:
chickeneer
2019-07-22 17:59:26 -05:00
parent d17055eb99
commit 4b9bab652e
3 changed files with 5 additions and 3 deletions
@@ -41,6 +41,7 @@ public class ACFBungeeUtil {
/**
* Move to Message Keys on the CommandIssuer
*
* @deprecated
*/
@Deprecated
@@ -112,7 +113,7 @@ public class ACFBungeeUtil {
public static ProxiedPlayer findPlayerSmart(CommandIssuer issuer, String search) {
CommandSender requester = issuer.getIssuer();
String name = ACFUtil.replace(search, ":confirm", "");
if (name.length() < 3) {
if (name.length() < 2) {
issuer.sendError(MinecraftMessageKeys.USERNAME_TOO_SHORT);
return null;
}
@@ -141,6 +142,7 @@ public class ACFBungeeUtil {
/**
* Please move to the CommandIssuer version
*
* @deprecated
*/
public static ProxiedPlayer findPlayerSmart(CommandSender requester, String search) {
@@ -17,7 +17,7 @@ public class ACFSpongeUtil {
return null;
}
String name = ACFUtil.replace(search, ":confirm", "");
if (name.length() < 3) {
if (name.length() < 2) {
issuer.sendError(MinecraftMessageKeys.USERNAME_TOO_SHORT);
return null;
}
@@ -24,7 +24,7 @@ public class ACFVelocityUtil {
public static Player findPlayerSmart(ProxyServer server, CommandIssuer issuer, String search) {
CommandSource requester = issuer.getIssuer();
String name = ACFUtil.replace(search, ":confirm", "");
if (name.length() < 3) {
if (name.length() < 2) {
issuer.sendError(MinecraftMessageKeys.USERNAME_TOO_SHORT);
return null;
}