mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2025-02-04 22:41:25 +01:00
Check skin name length is 3-16 characters when fetching players
This commit is contained in:
parent
4c33fa4f86
commit
09c482e2f6
@ -33,7 +33,8 @@ public class ProfileRequest {
|
||||
* @param handler
|
||||
* Optional handler to handle the result for the profile. Handler always invoked from the main thread.
|
||||
*/
|
||||
ProfileRequest(String playerName, @Nullable ProfileFetchHandler handler) {
|
||||
|
||||
public ProfileRequest(String playerName, ProfileFetchHandler handler) {
|
||||
Preconditions.checkNotNull(playerName);
|
||||
|
||||
this.playerName = playerName;
|
||||
|
@ -155,9 +155,9 @@ public class Skin {
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (this.skinName.length() < 3) {
|
||||
if (skinName.length() < 3 || skinName.length() > 16) {
|
||||
if (Messaging.isDebugging()) {
|
||||
Messaging.debug("Skin name too short '" + skinName + "'");
|
||||
Messaging.debug("Skin name invalid length '" + skinName + "'");
|
||||
}
|
||||
return;
|
||||
}
|
||||
@ -208,9 +208,9 @@ public class Skin {
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (this.skinName.length() < 3) {
|
||||
if (skinName.length() < 3 || skinName.length() > 16) {
|
||||
if (Messaging.isDebugging()) {
|
||||
Messaging.debug("Skin name too short '" + skinName + "'");
|
||||
Messaging.debug("Skin name invalid length '" + skinName + "'");
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
@ -30,7 +30,6 @@ import net.citizensnpcs.util.NMS;
|
||||
public class SkinPacketTracker {
|
||||
private final SkinnableEntity entity;
|
||||
private final Map<UUID, PlayerEntry> inProgress = new HashMap<UUID, PlayerEntry>(Bukkit.getMaxPlayers() / 2);
|
||||
|
||||
private boolean isRemoved;
|
||||
private Skin skin;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user