mirror of
https://github.com/PaperMC/Paper.git
synced 2025-02-11 10:01:55 +01:00
Fix NPE when completing skull lookups without a real owner (Fixes #6052)
This looks like mojang introduced an NPE however it was previously being supressed by the future used by the server, we'll just stick to the legacy behavior of retainining the existing profile of earlier versions
This commit is contained in:
parent
aa1d49efd6
commit
2143a948be
@ -15,6 +15,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
- SkullBlockEntity.profileCache.getAsync(owner.getName(), (gameprofile1) -> {
|
- SkullBlockEntity.profileCache.getAsync(owner.getName(), (gameprofile1) -> {
|
||||||
+ // Paper start
|
+ // Paper start
|
||||||
+ SkullBlockEntity.profileCache.getAsync(owner.getName(), (gameprofile) -> {
|
+ SkullBlockEntity.profileCache.getAsync(owner.getName(), (gameprofile) -> {
|
||||||
|
+ if (gameprofile == null) {
|
||||||
|
+ net.minecraft.server.MinecraftServer.getServer().scheduleOnMain(() -> callback.accept(owner));
|
||||||
|
+ return;
|
||||||
|
+ }
|
||||||
+ Runnable runnable = () -> {
|
+ Runnable runnable = () -> {
|
||||||
+ GameProfile gameprofile1 = gameprofile;
|
+ GameProfile gameprofile1 = gameprofile;
|
||||||
Property property = (Property) Iterables.getFirst(gameprofile1.getProperties().get("textures"), (Object) null);
|
Property property = (Property) Iterables.getFirst(gameprofile1.getProperties().get("textures"), (Object) null);
|
||||||
|
Loading…
Reference in New Issue
Block a user