From 7f19304b9e249aad79bb342a22fb478259b3d61c Mon Sep 17 00:00:00 2001 From: Rainnny7 Date: Mon, 8 Apr 2024 23:33:17 -0400 Subject: [PATCH] Update server icon route - only support Java edition --- README.md | 2 +- pom.xml | 13 ++++++------- .../me/braydon/mc/controller/ServerController.java | 7 +++---- 3 files changed, 10 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index b482960..ba4670c 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ Hi there! Looking for usage? View the [Wiki](https://git.rainnny.club/Rainnny/RE - [x] Blacklist Checking - [x] HTTP Codes in wiki - [ ] Route for 3D player heads/body? -- [ ] Bedrock Server Support +- [x] Bedrock Server Support --- diff --git a/pom.xml b/pom.xml index 5808889..7d7db14 100644 --- a/pom.xml +++ b/pom.xml @@ -95,6 +95,12 @@ 0.5.11 compile + + net.md-5 + bungeecord-chat + 1.20-R0.2 + compile + @@ -104,13 +110,6 @@ compile - - net.md-5 - bungeecord-chat - 1.20-R0.2 - compile - - org.springframework.boot diff --git a/src/main/java/me/braydon/mc/controller/ServerController.java b/src/main/java/me/braydon/mc/controller/ServerController.java index b37c8e5..bbd4e1d 100644 --- a/src/main/java/me/braydon/mc/controller/ServerController.java +++ b/src/main/java/me/braydon/mc/controller/ServerController.java @@ -748,15 +748,14 @@ public final class ServerController { * Get the server icon of a Minecraft * server by its platform and hostname. * - * @param platform the platform of the server * @param hostname the hostname of the server * @return the server icon */ - @GetMapping("/icon/{platform}/{hostname}") + @GetMapping("/icon/{hostname}") @ResponseBody - public ResponseEntity getServerIcon(@PathVariable @NonNull String platform, @PathVariable @NonNull String hostname) { + public ResponseEntity getServerFavicon(@PathVariable @NonNull String hostname) { return ResponseEntity.ok() .contentType(MediaType.IMAGE_PNG) - .body(mojangService.getServerFavicon(platform, hostname)); + .body(mojangService.getServerFavicon(hostname)); } } \ No newline at end of file