mirror of
https://github.com/LuckPerms/LuckPerms.git
synced 2024-11-24 11:38:40 +01:00
Don't allow user names to be set if the length exceeds 16 characters
This commit is contained in:
parent
211fb219a7
commit
26feeb125e
@ -117,6 +117,9 @@ public class User extends PermissionHolder implements Identifiable<UserIdentifie
|
||||
* @return true if a change was made
|
||||
*/
|
||||
public boolean setName(String name, boolean weak) {
|
||||
if (name != null && name.length() > 16) {
|
||||
return false; // nope
|
||||
}
|
||||
|
||||
// if weak is true, only update the value in the User if it's null
|
||||
if (weak && this.name != null) {
|
||||
|
Loading…
Reference in New Issue
Block a user