Avoid NPE due to PlayerBedFailEnterEvent

fixes #5670
This commit is contained in:
Riley Park 2021-05-18 08:57:17 -07:00
parent 537bd9de29
commit 7f734a18b7

View file

@ -48,7 +48,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
// CraftBukkit end
if (entityhuman_enumbedresult != null) {
- entityhuman.a(entityhuman_enumbedresult.a(), true);
+ entityhuman.a(PaperAdventure.asVanilla(event.getMessage()), true); // Paper
+ final net.kyori.adventure.text.Component message = event.getMessage(); // Paper
+ if(message != null) entityhuman.a(PaperAdventure.asVanilla(message), true); // Paper
}
+ } // Paper