Remove LiteSkullAPI in favor of ResolvableProfiles#196
Conversation
…n Discord4J gracefully. Fix UserCreateEvent
There was a problem hiding this comment.
Code Review
This pull request removes the liteskullapi dependency, transitioning to Paper's native DataComponents for player head rendering in GUIs. It also updates the paper-api and discord4j-core versions and modifies the Discord client shutdown logic to be synchronous. Review feedback highlights that several specified dependency versions for Paper and Jackson are non-existent, which will break the build. Furthermore, marking UserCreateEvent as asynchronous introduces potential thread-safety risks when interacting with the Bukkit API.
| dependencies { | ||
| // minecraft development api | ||
| compileOnly("io.papermc.paper:paper-api:1.21.10-R0.1-SNAPSHOT") | ||
| compileOnly("io.papermc.paper:paper-api:1.21.11-R0.1-SNAPSHOT") |
There was a problem hiding this comment.
| paperLibrary("io.projectreactor.netty:reactor-netty-http:1.2.16") | ||
| paperLibrary("com.fasterxml.jackson.core:jackson-databind:2.21.2") | ||
| paperLibrary("com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.21.2") |
There was a problem hiding this comment.
The versions specified for reactor-netty-http (1.2.16) and Jackson (2.21.2) are invalid and do not exist in Maven Central. Reactor Netty 1.2 is currently at 1.2.2, and Jackson is at 2.18.2. These non-existent versions will prevent the project from building.
paperLibrary("io.projectreactor.netty:reactor-netty-http:1.2.2")
paperLibrary("com.fasterxml.jackson.core:jackson-databind:2.18.2")
paperLibrary("com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.18.2")| private final User user; | ||
|
|
||
| public UserCreateEvent(User user) { | ||
| super(true); |
There was a problem hiding this comment.
Marking this event as asynchronous (super(true)) requires all listeners to be thread-safe. Since many Bukkit API methods are not thread-safe, this can lead to race conditions or exceptions if listeners are not carefully implemented. Unless there is a specific performance requirement, it is generally safer to fire events on the primary server thread.
Skulls are now resolved on the client side, rendering LiteSkullAPI useless.