Update server icon route - only support Java edition
All checks were successful
Deploy App / docker (ubuntu-latest, 2.44.0) (push) Successful in 1m5s
All checks were successful
Deploy App / docker (ubuntu-latest, 2.44.0) (push) Successful in 1m5s
This commit is contained in:
parent
e9ce888d06
commit
7f19304b9e
@ -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
|
||||
|
||||
---
|
||||
|
||||
|
13
pom.xml
13
pom.xml
@ -95,6 +95,12 @@
|
||||
<version>0.5.11</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.md-5</groupId>
|
||||
<artifactId>bungeecord-chat</artifactId>
|
||||
<version>1.20-R0.2</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- DNS Lookup -->
|
||||
<dependency>
|
||||
@ -104,13 +110,6 @@
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>net.md-5</groupId>
|
||||
<artifactId>bungeecord-chat</artifactId>
|
||||
<version>1.20-R0.2</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- Tests -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
|
@ -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<byte[]> getServerIcon(@PathVariable @NonNull String platform, @PathVariable @NonNull String hostname) {
|
||||
public ResponseEntity<byte[]> getServerFavicon(@PathVariable @NonNull String hostname) {
|
||||
return ResponseEntity.ok()
|
||||
.contentType(MediaType.IMAGE_PNG)
|
||||
.body(mojangService.getServerFavicon(platform, hostname));
|
||||
.body(mojangService.getServerFavicon(hostname));
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user