mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2024-11-26 17:05:01 +00:00
FS-308: Should fix invalid names by checking if the name matches the A-z regex and if the name's length is between 3-16
This commit is contained in:
parent
62529a6171
commit
618d5c5ecb
@ -67,6 +67,11 @@ public class Command_cage extends FreedomCommand
|
||||
outerMaterial = Material.PLAYER_HEAD;
|
||||
if (args.length >= 3)
|
||||
{
|
||||
if (!args[2].matches("([A-z]*)") || args[2].length() < 3 || args[2].length() > 16)
|
||||
{
|
||||
msg("Invalid name!", ChatColor.RED);
|
||||
return true;
|
||||
}
|
||||
skullName = args[2];
|
||||
}
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user