add working skin layers and rename param for overlay
All checks were successful
Deploy App / docker (ubuntu-latest, 2.44.0, 17, 3.8.5) (push) Successful in 1m35s
All checks were successful
Deploy App / docker (ubuntu-latest, 2.44.0, 17, 3.8.5) (push) Successful in 1m35s
This commit is contained in:
@ -49,7 +49,7 @@ public class PlayerController {
|
||||
@Parameter(description = "The part of the skin", example = "head") @PathVariable String part,
|
||||
@Parameter(description = "The UUID or Username of the player", example = "ImFascinated") @PathVariable String id,
|
||||
@Parameter(description = "The size of the image", example = "256") @RequestParam(required = false, defaultValue = "256") int size,
|
||||
@Parameter(description = "Whether to render the skin overlay (skin layers)", example = "false") @RequestParam(required = false, defaultValue = "false") boolean renderOverlay,
|
||||
@Parameter(description = "Whether to render the skin overlay (skin layers)", example = "false") @RequestParam(required = false, defaultValue = "false") boolean overlay,
|
||||
@Parameter(description = "Whether to download the image") @RequestParam(required = false, defaultValue = "false") boolean download) {
|
||||
CachedPlayer player = playerService.getPlayer(id);
|
||||
Skin.Parts skinPart = Skin.Parts.fromName(part);
|
||||
@ -60,6 +60,6 @@ public class PlayerController {
|
||||
.cacheControl(cacheControl)
|
||||
.contentType(MediaType.IMAGE_PNG)
|
||||
.header(HttpHeaders.CONTENT_DISPOSITION, dispositionHeader.formatted(player.getUsername()))
|
||||
.body(playerService.getSkinPart(player, skinPart, renderOverlay, size).getBytes());
|
||||
.body(playerService.getSkinPart(player, skinPart, overlay, size).getBytes());
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user