validate names when trusting players
This commit is contained in:
parent
9fe7f8258d
commit
56ad239cbc
|
|
@ -2589,6 +2589,10 @@ public class GriefPrevention extends JavaPlugin
|
|||
String permission = null;
|
||||
OfflinePlayer otherPlayer = null;
|
||||
UUID recipientID = null;
|
||||
if (!recipientName.matches("^\\w{3,16}$")) {
|
||||
GriefPrevention.sendMessage(player, TextMode.Err, Messages.PlayerNotFound2);
|
||||
return;
|
||||
}
|
||||
if (recipientName.startsWith("[") && recipientName.endsWith("]"))
|
||||
{
|
||||
permission = recipientName.substring(1, recipientName.length() - 1);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user