mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-06-28 02:00:10 +00:00
Strip invalid chars from kit names
This may possibly block some kits from working that previous worked, if the kit name contained unusual letters
This commit is contained in:
parent
fee3d7c0d3
commit
bc798977b5
3 changed files with 5 additions and 4 deletions
|
@ -25,12 +25,12 @@ public class Commandkit extends EssentialsCommand
|
|||
else if (args.length > 1 && user.isAuthorized("essentials.kit.others"))
|
||||
{
|
||||
final User userTo = getPlayer(server, args, 1, true);
|
||||
final String kitName = args[0].toLowerCase(Locale.ENGLISH);
|
||||
final String kitName = Util.sanitizeString(args[0].toLowerCase(Locale.ENGLISH));
|
||||
giveKit(userTo, user, kitName);
|
||||
}
|
||||
else
|
||||
{
|
||||
final String kitName = args[0].toLowerCase(Locale.ENGLISH);
|
||||
final String kitName = Util.sanitizeString(args[0].toLowerCase(Locale.ENGLISH));
|
||||
giveKit(user, user, kitName);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue