add minimum size to player images

This commit is contained in:
Lee 2024-04-12 19:52:38 +01:00
parent 55c1ca4139
commit 4b672de85d

View File

@ -132,6 +132,10 @@ public class PlayerService {
log.info("Size {} is too large, setting to 512", size); log.info("Size {} is too large, setting to 512", size);
size = 512; size = 512;
} }
if (size < 32) {
log.info("Size {} is too small, setting to 32", size);
size = 32;
}
ISkinPart part = ISkinPart.getByName(partName); // The skin part to get ISkinPart part = ISkinPart.getByName(partName); // The skin part to get
if (part == null) { if (part == null) {
throw new BadRequestException("Invalid skin part: %s".formatted(partName)); throw new BadRequestException("Invalid skin part: %s".formatted(partName));