extras/src/main/java/pw/kaboom/extras/skin/response/SkinResponse.java
Allink cbbc4937d5
Fix & improve skin command, improve username command (#331)
* Use per-player ratelimit for /username

* Improve the skin system

- Migrates skin getting over to Mojang. I do indeed understand that the Mojang API is more ratelimited and generally harder to use, it should be noted that it has an almost 0% chance of error. Compare that to Ashcon which, on some days, has a 50% chance of actually recognizing your account exists
- Uses CompletableFutures and a ExecutorService for making requests
- Renames SkinDownloader class to SkinManager class
- Makes SkinManager class static
- Limits the /skin command per-player
2022-12-27 19:50:02 +02:00

33 lines
594 B
Java

package pw.kaboom.extras.skin.response;
import com.destroystokyo.paper.profile.ProfileProperty;
import java.util.List;
import java.util.Objects;
public final class SkinResponse {
private final String id;
private final String name;
private final List<ProfileProperty> properties;
public SkinResponse(String id, String name, List<ProfileProperty> properties) {
this.id = id;
this.name = name;
this.properties = properties;
}
public String id() {
return id;
}
public String name() {
return name;
}
public List<ProfileProperty> properties() {
return properties;
}
}