mirror of
https://github.com/aikar/commands.git
synced 2026-05-31 06:11:55 +00:00
Reduce required length of player names GH-226
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user